lock: dont load media cover when anim

Also no fractional font size
Fix log warning
This commit is contained in:
2 * r + 2 * t 2025-08-12 17:32:48 +10:00
parent ab531a83b7
commit 13e0064abe
4 changed files with 11 additions and 7 deletions

View file

@ -29,7 +29,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
text: root.timeComponents[0] text: root.timeComponents[0]
color: Colours.palette.m3secondary 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 font.bold: true
} }
@ -37,7 +37,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
text: ":" text: ":"
color: Colours.palette.m3primary 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 font.bold: true
} }
@ -45,7 +45,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
text: root.timeComponents[1] text: root.timeComponents[1]
color: Colours.palette.m3secondary 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 font.bold: true
} }
@ -60,7 +60,7 @@ ColumnLayout {
sourceComponent: StyledText { sourceComponent: StyledText {
text: root.timeComponents[2] ?? "" text: root.timeComponents[2] ?? ""
color: Colours.palette.m3primary 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 font.bold: true
} }
} }
@ -72,7 +72,7 @@ ColumnLayout {
text: Time.format("dddd, d MMMM yyyy") text: Time.format("dddd, d MMMM yyyy")
color: Colours.palette.m3tertiary 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.family: Appearance.font.family.mono
font.bold: true font.bold: true
} }

View file

@ -55,6 +55,8 @@ RowLayout {
Media { Media {
id: media id: media
lock: root.lock
} }
} }
} }

View file

@ -130,7 +130,7 @@ ColumnLayout {
spacing: Appearance.spacing.large spacing: Appearance.spacing.large
Repeater { 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 { StyledRect {
required property int index required property int index

View file

@ -11,13 +11,15 @@ import QtQuick.Layouts
Item { Item {
id: root id: root
required property var lock
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
implicitHeight: layout.implicitHeight implicitHeight: layout.implicitHeight
Image { Image {
anchors.fill: parent anchors.fill: parent
source: Players.active?.trackArtUrl ?? "" source: root.lock.animating ? "" : (Players.active?.trackArtUrl ?? "")
asynchronous: true asynchronous: true
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop