bg clock: fix am pm parsing for 1 digit hours

This commit is contained in:
end-4
2025-10-11 16:57:26 +02:00
parent 410da66834
commit c197f6eab2
@@ -21,7 +21,8 @@ Column {
delegate: StyledText {
required property string modelData
property bool isAmPm: !modelData.match(/\d{2}/i)
text: modelData.padStart(2, "0")
property bool isAmPm: !text.match(/\d{2}/i)
property real numberSizeWithoutGlow: isAmPm ? 26 : 68
property real numberSizeWithGlow: isAmPm ? 20 : 40
property real numberSize: root.hourMarksEnabled ? numberSizeWithGlow : numberSizeWithoutGlow
@@ -37,8 +38,6 @@ Column {
Behavior on numberSize {
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
}
text: modelData.padStart(2, "0")
}
}
}