scale lock screen clock to fill screen height

This commit is contained in:
Damocles 2026-04-18 00:56:25 +02:00
parent da158de748
commit 494e17cce1

View file

@ -83,14 +83,14 @@ WlSessionLockSurface {
} }
} }
// Clock - rotated, left-aligned // Clock - rotated, left-aligned, scaled to screen height
Item { Item {
id: _clockItem id: _clockItem
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 48 anchors.leftMargin: 48
anchors.verticalCenter: parent.verticalCenter anchors.top: parent.top
anchors.bottom: parent.bottom
width: _clockText.height width: _clockText.height
height: _clockCol.implicitWidth
opacity: 0 opacity: 0
property real _slideX: -80 property real _slideX: -80
@ -118,12 +118,11 @@ WlSessionLockSurface {
spacing: 8 spacing: 8
rotation: -90 rotation: -90
transformOrigin: Item.Center transformOrigin: Item.Center
Text { Text {
id: _clockText id: _clockText
text: Qt.formatTime(new Date(), "HH:mm") text: Qt.formatTime(new Date(), "HH:mm")
color: S.Theme.base05 color: S.Theme.base05
font.pixelSize: 72 font.pixelSize: Math.max(48, root.height * 0.18)
font.family: S.Theme.fontFamily font.family: S.Theme.fontFamily
font.bold: true font.bold: true