aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/island
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/island')
-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