From 685ad569a3d362c1b02cd2d26862059889232c9b Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 20 Jan 2026 20:53:34 +1100 Subject: background: fix desktop clock 12h format --- modules/lock/Center.qml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/lock') diff --git a/modules/lock/Center.qml b/modules/lock/Center.qml index e37207a..19cf9d2 100644 --- a/modules/lock/Center.qml +++ b/modules/lock/Center.qml @@ -13,7 +13,6 @@ ColumnLayout { id: root required property var lock - readonly property list timeComponents: Time.format(Config.services.useTwelveHourClock ? "hh:mm:A" : "hh:mm").split(":") readonly property real centerScale: Math.min(1, (lock.screen?.height ?? 1440) / 1440) readonly property int centerWidth: Config.lock.sizes.centerWidth * centerScale @@ -29,7 +28,7 @@ ColumnLayout { StyledText { Layout.alignment: Qt.AlignVCenter - text: root.timeComponents[0] + text: Time.hourStr color: Colours.palette.m3secondary font.pointSize: Math.floor(Appearance.font.size.extraLarge * 3 * root.centerScale) font.family: Appearance.font.family.clock @@ -47,7 +46,7 @@ ColumnLayout { StyledText { Layout.alignment: Qt.AlignVCenter - text: root.timeComponents[1] + text: Time.minuteStr color: Colours.palette.m3secondary font.pointSize: Math.floor(Appearance.font.size.extraLarge * 3 * root.centerScale) font.family: Appearance.font.family.clock @@ -62,7 +61,7 @@ ColumnLayout { visible: active sourceComponent: StyledText { - text: root.timeComponents[2] ?? "" + text: Time.amPmStr color: Colours.palette.m3primary font.pointSize: Math.floor(Appearance.font.size.extraLarge * 2 * root.centerScale) font.family: Appearance.font.family.clock -- cgit v1.2.3-freya