diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/lock/Center.qml | 11 | ||||
| -rw-r--r-- | modules/lock/Fetch.qml | 2 | ||||
| -rw-r--r-- | modules/lock/Media.qml | 2 |
3 files changed, 8 insertions, 7 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 diff --git a/modules/lock/Fetch.qml b/modules/lock/Fetch.qml index 00bca7c..755e7f8 100644 --- a/modules/lock/Fetch.qml +++ b/modules/lock/Fetch.qml @@ -109,7 +109,7 @@ ColumnLayout { Layout.alignment: Qt.AlignHCenter asynchronous: true - active: root.height > 250 + active: root.height > 220 visible: active sourceComponent: RowLayout { diff --git a/modules/lock/Media.qml b/modules/lock/Media.qml index 2967480..f4b6365 100644 --- a/modules/lock/Media.qml +++ b/modules/lock/Media.qml @@ -17,7 +17,7 @@ Item { Image { anchors.fill: parent - source: Players.active?.trackArtUrl ?? null + source: Players.active?.trackArtUrl ?? "" asynchronous: true fillMode: Image.PreserveAspectCrop |