summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/Clock.qml
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Clock.qml')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Clock.qml17
1 files changed, 5 insertions, 12 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Clock.qml b/accounts/gkleen@sif/shell/quickshell/Clock.qml
index 744b187f..a1872ff5 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
@@ -244,7 +237,7 @@ Item {
244 font.family: "Fira Sans" 237 font.family: "Fira Sans"
245 font.features: { "tnum": 1 } 238 font.features: { "tnum": 1 }
246 239
247 property bool today: systemClock.date.getFullYear() == model.year && systemClock.date.getMonth() == model.month && systemClock.date.getDate() == model.day 240 property bool today: chrono.date.getFullYear() == model.year && chrono.date.getMonth() == model.month && chrono.date.getDate() == model.day
248 241
249 text: model.day 242 text: model.day
250 color: today ? "#ff6699" : "white" 243 color: today ? "#ff6699" : "white"