diff options
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Clock.qml')
-rw-r--r-- | accounts/gkleen@sif/shell/quickshell/Clock.qml | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Clock.qml b/accounts/gkleen@sif/shell/quickshell/Clock.qml index 744b187f..edce57e3 100644 --- a/accounts/gkleen@sif/shell/quickshell/Clock.qml +++ b/accounts/gkleen@sif/shell/quickshell/Clock.qml | |||
@@ -43,10 +43,9 @@ Item { | |||
43 | 43 | ||
44 | Custom.Chrono { | 44 | Custom.Chrono { |
45 | id: chrono | 45 | id: chrono |
46 | format: "W{0:%V-%u} {0:%F} {0:%H:%M:%S%Ez}" | ||
47 | } | ||
48 | 46 | ||
49 | text: chrono.date | 47 | onDateChanged: clock.text = format("W{0:%V-%u} {0:%F} {0:%H:%M:%S%Ez}") |
48 | } | ||
50 | 49 | ||
51 | font.pointSize: 10 | 50 | font.pointSize: 10 |
52 | font.family: "Fira Sans" | 51 | font.family: "Fira Sans" |
@@ -79,7 +78,7 @@ Item { | |||
79 | color: "black" | 78 | color: "black" |
80 | 79 | ||
81 | onVisibleChanged: { | 80 | onVisibleChanged: { |
82 | yearCalendar.year = systemClock.date.getFullYear(); | 81 | yearCalendar.year = chrono.date.getFullYear(); |
83 | clockMouseArea.angleRem = 0; | 82 | clockMouseArea.angleRem = 0; |
84 | } | 83 | } |
85 | 84 | ||
@@ -117,7 +116,7 @@ Item { | |||
117 | } | 116 | } |
118 | 117 | ||
119 | GridLayout { | 118 | GridLayout { |
120 | property int year: systemClock.date.getFullYear() | 119 | property int year: chrono.date.getFullYear() |
121 | 120 | ||
122 | id: yearCalendar | 121 | id: yearCalendar |
123 | 122 | ||
@@ -128,12 +127,6 @@ Item { | |||
128 | Layout.alignment: Qt.AlignHCenter | 127 | Layout.alignment: Qt.AlignHCenter |
129 | Layout.fillWidth: false | 128 | Layout.fillWidth: false |
130 | 129 | ||
131 | SystemClock { | ||
132 | id: systemClock | ||
133 | |||
134 | precision: SystemClock.Minutes | ||
135 | } | ||
136 | |||
137 | Repeater { | 130 | Repeater { |
138 | model: 12 | 131 | model: 12 |
139 | 132 | ||
@@ -169,17 +162,25 @@ Item { | |||
169 | Layout.column: 1 | 162 | Layout.column: 1 |
170 | Layout.fillWidth: true | 163 | Layout.fillWidth: true |
171 | 164 | ||
172 | delegate: Text { | 165 | delegate: WrapperItem { |
173 | required property string shortName | 166 | required property string shortName |
174 | 167 | ||
175 | font.pointSize: 10 | 168 | width: dowLabel.contentWidth + 6 |
176 | font.family: "Fira Mono" | ||
177 | 169 | ||
178 | text: shortName | 170 | Text { |
179 | color: "#ffcc66" | 171 | id: dowLabel |
180 | 172 | ||
181 | horizontalAlignment: Text.AlignRight | 173 | anchors.fill: parent |
182 | verticalAlignment: Text.AlignVCenter | 174 | |
175 | font.pointSize: 10 | ||
176 | font.family: "Fira Sans" | ||
177 | |||
178 | text: parent.shortName | ||
179 | color: "#ffcc66" | ||
180 | |||
181 | horizontalAlignment: Text.AlignHCenter | ||
182 | verticalAlignment: Text.AlignVCenter | ||
183 | } | ||
183 | } | 184 | } |
184 | } | 185 | } |
185 | 186 | ||
@@ -244,7 +245,7 @@ Item { | |||
244 | font.family: "Fira Sans" | 245 | font.family: "Fira Sans" |
245 | font.features: { "tnum": 1 } | 246 | font.features: { "tnum": 1 } |
246 | 247 | ||
247 | property bool today: systemClock.date.getFullYear() == model.year && systemClock.date.getMonth() == model.month && systemClock.date.getDate() == model.day | 248 | property bool today: chrono.date.getFullYear() == model.year && chrono.date.getMonth() == model.month && chrono.date.getDate() == model.day |
248 | 249 | ||
249 | text: model.day | 250 | text: model.day |
250 | color: today ? "#ff6699" : "white" | 251 | color: today ? "#ff6699" : "white" |