summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-12 12:21:34 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-12 12:21:34 +1000
commit68bb5dd7f937e241dba61ec70ccd5b75607a2d85 (patch)
treecb7ad11916ff89007385c0ef4d7d6df4ba025113 /modules
parentwallpapers: allow symlinked wallpaper directory (#399) (diff)
downloadcaelestia-shell-68bb5dd7f937e241dba61ec70ccd5b75607a2d85.tar.gz
caelestia-shell-68bb5dd7f937e241dba61ec70ccd5b75607a2d85.tar.bz2
caelestia-shell-68bb5dd7f937e241dba61ec70ccd5b75607a2d85.zip
lock: better scaling + fix null error
Diffstat (limited to '')
-rw-r--r--modules/lock/Center.qml11
-rw-r--r--modules/lock/Fetch.qml2
-rw-r--r--modules/lock/Media.qml2
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