From c55500fba0390141ab2d1baeb90f7a458898ffab Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Thu, 7 Apr 2022 10:35:35 -0400 Subject: [PATCH] lockscreen: Fix clock not adhering to time format settings --- look-and-feel/contents/lockscreen/Clock.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/look-and-feel/contents/lockscreen/Clock.qml b/look-and-feel/contents/lockscreen/Clock.qml index 06107b87..40eaef7a 100644 --- a/look-and-feel/contents/lockscreen/Clock.qml +++ b/look-and-feel/contents/lockscreen/Clock.qml @@ -10,12 +10,14 @@ import QtGraphicalEffects 1.12 import org.kde.plasma.core 2.0 +import org.kde.plasma.private.mobileshell 1.0 as MobileShell + ColumnLayout { id: root property int layoutAlignment readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software - readonly property bool is24HourTime: Qt.locale().timeFormat(Locale.ShortFormat).toLowerCase().indexOf("ap") === -1 + readonly property bool is24HourTime: MobileShell.ShellUtil.isSystem24HourFormat Layout.alignment: layoutAlignment spacing: Units.gridUnit