From 13e0064abe52c13d3aebe31713442ec9bba48ed3 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 12 Aug 2025 17:32:48 +1000 Subject: lock: dont load media cover when anim Also no fractional font size Fix log warning --- modules/lock/Center.qml | 10 +++++----- modules/lock/Content.qml | 2 ++ modules/lock/Fetch.qml | 2 +- modules/lock/Media.qml | 4 +++- 4 files changed, 11 insertions(+), 7 deletions(-) (limited to 'modules/lock') 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 -- cgit v1.2.3-freya