summaryrefslogtreecommitdiff
path: root/modules/background/DesktopClock.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-20 20:53:34 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-20 20:53:34 +1100
commit685ad569a3d362c1b02cd2d26862059889232c9b (patch)
tree44d991f9da1429800777b56c265d516ddcf6272c /modules/background/DesktopClock.qml
parentcontrolcenter: add per-application audio controls (#1098) (diff)
downloadcaelestia-shell-685ad569a3d362c1b02cd2d26862059889232c9b.tar.gz
caelestia-shell-685ad569a3d362c1b02cd2d26862059889232c9b.tar.bz2
caelestia-shell-685ad569a3d362c1b02cd2d26862059889232c9b.zip
background: fix desktop clock 12h format
Diffstat (limited to 'modules/background/DesktopClock.qml')
-rw-r--r--modules/background/DesktopClock.qml23
1 files changed, 14 insertions, 9 deletions
diff --git a/modules/background/DesktopClock.qml b/modules/background/DesktopClock.qml
index a6b05c2..77fe447 100644
--- a/modules/background/DesktopClock.qml
+++ b/modules/background/DesktopClock.qml
@@ -79,7 +79,7 @@ Item {
spacing: Appearance.spacing.small
StyledText {
- text: Time.format(Config.services.useTwelveHourClock ? "hh" : "HH")
+ text: Time.hourStr
font.pointSize: Appearance.font.size.extraLarge * 3 * root.scale
font.weight: Font.Bold
color: root.safePrimary
@@ -94,19 +94,24 @@ Item {
}
StyledText {
- text: Time.format("mm")
+ text: Time.minuteStr
font.pointSize: Appearance.font.size.extraLarge * 3 * root.scale
font.weight: Font.Bold
color: root.safeSecondary
}
- StyledText {
- visible: Config.services.useTwelveHourClock
- text: Time.format("A")
- font.pointSize: Appearance.font.size.large * root.scale
- color: root.safeSecondary
+ Loader {
Layout.alignment: Qt.AlignTop
Layout.topMargin: Appearance.padding.large * 1.4 * root.scale
+
+ active: Config.services.useTwelveHourClock
+ visible: active
+
+ sourceComponent: StyledText {
+ text: Time.amPmStr
+ font.pointSize: Appearance.font.size.large * root.scale
+ color: root.safeSecondary
+ }
}
}
@@ -155,10 +160,10 @@ Item {
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
}
}
-
+
Behavior on implicitWidth {
Anim {
duration: Appearance.anim.durations.small
}
}
-} \ No newline at end of file
+}