LockScreen: make digital font bigger

This commit is contained in:
Ly-sec
2025-11-20 17:39:01 +01:00
parent c50776eeee
commit edd4ba1b15
2 changed files with 20 additions and 2 deletions

View File

@@ -377,6 +377,8 @@ Loader {
backgroundColor: Color.mSurface backgroundColor: Color.mSurface
clockColor: Color.mOnSurface clockColor: Color.mOnSurface
secondHandColor: Color.mPrimary secondHandColor: Color.mPrimary
hoursFontSize: Style.fontSizeL
minutesFontSize: Style.fontSizeL
} }
} }
} }

View File

@@ -49,6 +49,10 @@ Item {
property color progressColor: root.secondHandColor property color progressColor: root.secondHandColor
// Font size properties for digital clock
property real hoursFontSize: Style.fontSizeXS
property real minutesFontSize: Style.fontSizeXXS
height: Math.round((Style.fontSizeXXXL * 1.9) / 2 * Style.uiScaleRatio) * 2 height: Math.round((Style.fontSizeXXXL * 1.9) / 2 * Style.uiScaleRatio) * 2
width: root.height width: root.height
@@ -78,6 +82,16 @@ Item {
return root.progressColor; return root.progressColor;
}); });
} }
if (item.hasOwnProperty("hoursFontSize")) {
item.hoursFontSize = Qt.binding(function () {
return root.hoursFontSize;
});
}
if (item.hasOwnProperty("minutesFontSize")) {
item.minutesFontSize = Qt.binding(function () {
return root.minutesFontSize;
});
}
} }
} }
@@ -187,6 +201,8 @@ Item {
property color backgroundColor: Color.mPrimary property color backgroundColor: Color.mPrimary
property color clockColor: Color.mOnPrimary property color clockColor: Color.mOnPrimary
property color progressColor: Color.mError property color progressColor: Color.mError
property real hoursFontSize: Style.fontSizeXS
property real minutesFontSize: Style.fontSizeXXS
anchors.fill: parent anchors.fill: parent
@@ -238,7 +254,7 @@ Item {
return t.split(" ")[0]; return t.split(" ")[0];
} }
pointSize: Style.fontSizeXS pointSize: hoursFontSize
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
color: clockColor color: clockColor
family: Settings.data.ui.fontFixed family: Settings.data.ui.fontFixed
@@ -247,7 +263,7 @@ Item {
NText { NText {
text: Qt.formatTime(now, "mm") text: Qt.formatTime(now, "mm")
pointSize: Style.fontSizeXXS pointSize: minutesFontSize
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
color: clockColor color: clockColor
family: Settings.data.ui.fontFixed family: Settings.data.ui.fontFixed