diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-12 12:21:34 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-12 12:21:34 +1000 |
| commit | 68bb5dd7f937e241dba61ec70ccd5b75607a2d85 (patch) | |
| tree | cb7ad11916ff89007385c0ef4d7d6df4ba025113 /modules/lock/Center.qml | |
| parent | wallpapers: allow symlinked wallpaper directory (#399) (diff) | |
| download | caelestia-shell-68bb5dd7f937e241dba61ec70ccd5b75607a2d85.tar.gz caelestia-shell-68bb5dd7f937e241dba61ec70ccd5b75607a2d85.tar.bz2 caelestia-shell-68bb5dd7f937e241dba61ec70ccd5b75607a2d85.zip | |
lock: better scaling + fix null error
Diffstat (limited to 'modules/lock/Center.qml')
| -rw-r--r-- | modules/lock/Center.qml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/lock/Center.qml b/modules/lock/Center.qml index 284b6d5..45c14e0 100644 --- a/modules/lock/Center.qml +++ b/modules/lock/Center.qml @@ -13,8 +13,9 @@ ColumnLayout { required property var lock readonly property list<string> timeComponents: Time.format(Config.services.useTwelveHourClock ? "hh:mm:A" : "hh:mm").split(":") + readonly property int centerWidth: Config.lock.sizes.centerWidth * Math.min(1, lock.screen.height / 1440) - Layout.preferredWidth: Config.lock.sizes.centerWidth + Layout.preferredWidth: centerWidth Layout.fillHeight: true spacing: Appearance.spacing.large * 2 @@ -79,8 +80,8 @@ ColumnLayout { Layout.topMargin: Appearance.spacing.large * 2 Layout.alignment: Qt.AlignHCenter - implicitWidth: Config.lock.sizes.centerWidth / 2 - implicitHeight: Config.lock.sizes.centerWidth / 2 + implicitWidth: root.centerWidth / 2 + implicitHeight: root.centerWidth / 2 color: Colours.tPalette.m3surfaceContainer radius: Appearance.rounding.full @@ -91,7 +92,7 @@ ColumnLayout { text: "person" fill: 1 grade: 200 - font.pointSize: Math.floor(Config.lock.sizes.centerWidth / 4) + font.pointSize: Math.floor(root.centerWidth / 4) || 1 } CachingImage { @@ -105,7 +106,7 @@ ColumnLayout { StyledRect { Layout.alignment: Qt.AlignHCenter - implicitWidth: Config.lock.sizes.centerWidth * 0.8 + implicitWidth: root.centerWidth * 0.8 implicitHeight: input.implicitHeight + Appearance.padding.small * 2 color: Colours.tPalette.m3surfaceContainer |