summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-12 17:32:48 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-12 17:32:48 +1000
commit13e0064abe52c13d3aebe31713442ec9bba48ed3 (patch)
treeccbf97dd44aed0fd6d627df7036d72ca34c2ea50 /modules
parentlock: better scaling (diff)
downloadcaelestia-shell-13e0064abe52c13d3aebe31713442ec9bba48ed3.tar.gz
caelestia-shell-13e0064abe52c13d3aebe31713442ec9bba48ed3.tar.bz2
caelestia-shell-13e0064abe52c13d3aebe31713442ec9bba48ed3.zip
lock: dont load media cover when anim
Also no fractional font size Fix log warning
Diffstat (limited to 'modules')
-rw-r--r--modules/lock/Center.qml10
-rw-r--r--modules/lock/Content.qml2
-rw-r--r--modules/lock/Fetch.qml2
-rw-r--r--modules/lock/Media.qml4
4 files changed, 11 insertions, 7 deletions
diff --git a/modules/lock/Center.qml b/modules/lock/Center.qml
index 005a13c..fecd4aa 100644
--- a/modules/lock/Center.qml
+++ b/modules/lock/Center.qml
@@ -29,7 +29,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignVCenter
text: root.timeComponents[0]
color: Colours.palette.m3secondary
- font.pointSize: Appearance.font.size.extraLarge * 3 * root.centerScale
+ font.pointSize: Math.floor(Appearance.font.size.extraLarge * 3 * root.centerScale)
font.bold: true
}
@@ -37,7 +37,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignVCenter
text: ":"
color: Colours.palette.m3primary
- font.pointSize: Appearance.font.size.extraLarge * 3 * root.centerScale
+ font.pointSize: Math.floor(Appearance.font.size.extraLarge * 3 * root.centerScale)
font.bold: true
}
@@ -45,7 +45,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignVCenter
text: root.timeComponents[1]
color: Colours.palette.m3secondary
- font.pointSize: Appearance.font.size.extraLarge * 3 * root.centerScale
+ font.pointSize: Math.floor(Appearance.font.size.extraLarge * 3 * root.centerScale)
font.bold: true
}
@@ -60,7 +60,7 @@ ColumnLayout {
sourceComponent: StyledText {
text: root.timeComponents[2] ?? ""
color: Colours.palette.m3primary
- font.pointSize: Appearance.font.size.extraLarge * 2 * root.centerScale
+ font.pointSize: Math.floor(Appearance.font.size.extraLarge * 2 * root.centerScale)
font.bold: true
}
}
@@ -72,7 +72,7 @@ ColumnLayout {
text: Time.format("dddd, d MMMM yyyy")
color: Colours.palette.m3tertiary
- font.pointSize: Appearance.font.size.extraLarge * root.centerScale
+ font.pointSize: Math.floor(Appearance.font.size.extraLarge * root.centerScale)
font.family: Appearance.font.family.mono
font.bold: true
}
diff --git a/modules/lock/Content.qml b/modules/lock/Content.qml
index 3d7d6c4..6975a89 100644
--- a/modules/lock/Content.qml
+++ b/modules/lock/Content.qml
@@ -55,6 +55,8 @@ RowLayout {
Media {
id: media
+
+ lock: root.lock
}
}
}
diff --git a/modules/lock/Fetch.qml b/modules/lock/Fetch.qml
index 815807b..d33ebf1 100644
--- a/modules/lock/Fetch.qml
+++ b/modules/lock/Fetch.qml
@@ -130,7 +130,7 @@ ColumnLayout {
spacing: Appearance.spacing.large
Repeater {
- model: Math.min(8, root.width / (Appearance.font.size.larger * 2 + Appearance.spacing.large))
+ model: Math.max(0, Math.min(8, root.width / (Appearance.font.size.larger * 2 + Appearance.spacing.large)))
StyledRect {
required property int index
diff --git a/modules/lock/Media.qml b/modules/lock/Media.qml
index f4b6365..0f0f3f4 100644
--- a/modules/lock/Media.qml
+++ b/modules/lock/Media.qml
@@ -11,13 +11,15 @@ import QtQuick.Layouts
Item {
id: root
+ required property var lock
+
anchors.left: parent.left
anchors.right: parent.right
implicitHeight: layout.implicitHeight
Image {
anchors.fill: parent
- source: Players.active?.trackArtUrl ?? ""
+ source: root.lock.animating ? "" : (Players.active?.trackArtUrl ?? "")
asynchronous: true
fillMode: Image.PreserveAspectCrop