aboutsummaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-07 19:10:03 +0200
committerDanilo M. <danix@danix.xyz>2026-10-07 19:10:03 +0200
commitaace0a7da95e8ed6d680df8a5b466b9d7b24e855 (patch)
treebf2665194a2e67084d3084082763b07f71444ee4 /desktop
parent04fdf9ca7980b594ea674d8755b730569a550d26 (diff)
downloadquickshell-aace0a7da95e8ed6d680df8a5b466b9d7b24e855.tar.gz
quickshell-aace0a7da95e8ed6d680df8a5b466b9d7b24e855.zip
feat(island): the flick's desktop icon sits in a badge
Two icons side by side read as two apps. The desktop one is boxed, the number fallback with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/island/ClockPill.qml45
1 files changed, 33 insertions, 12 deletions
diff --git a/desktop/island/ClockPill.qml b/desktop/island/ClockPill.qml
index 07a0eb7..93e840f 100644
--- a/desktop/island/ClockPill.qml
+++ b/desktop/island/ClockPill.qml
@@ -77,19 +77,40 @@ Capsule {
opacity: pill.flicking ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 150 } }
- IconImage {
- anchors.verticalCenter: parent.verticalCenter
- visible: pill.wsPath !== ""
- implicitSize: 18
- source: pill.wsPath
- }
- // A named workspace, or one past eight, has no icon: its number.
- Text {
+ // The desktop sits in a badge so it does not read as a second app
+ // icon next to the real one.
+ Rectangle {
anchors.verticalCenter: parent.verticalCenter
- visible: pill.wsPath === ""
- text: pill.flickWs
- font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 1; weight: Font.DemiBold }
- color: Theme.accent
+ implicitWidth: Math.max(26, wsContent.implicitWidth + 10)
+ implicitHeight: 24
+ radius: 6
+ color: Qt.alpha(Theme.surface, 0.9)
+ border.width: 1
+ border.color: Qt.alpha(Theme.accent, 0.6)
+
+ Item {
+ id: wsContent
+ anchors.centerIn: parent
+ implicitWidth: pill.wsPath !== "" ? wsIconImage.implicitWidth : wsNumber.implicitWidth
+ implicitHeight: 18
+
+ IconImage {
+ id: wsIconImage
+ anchors.centerIn: parent
+ visible: pill.wsPath !== ""
+ implicitSize: 16
+ source: pill.wsPath
+ }
+ // A named workspace, or one past eight, has no icon: its number.
+ Text {
+ id: wsNumber
+ anchors.centerIn: parent
+ visible: pill.wsPath === ""
+ text: pill.flickWs
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; weight: Font.DemiBold }
+ color: Theme.accent
+ }
+ }
}
IconImage {
anchors.verticalCenter: parent.verticalCenter