feat: improve dash weather

This commit is contained in:
2 * r + 2 * t 2026-04-23 01:26:03 +10:00
parent e66e8f448d
commit 3cbff81c19
2 changed files with 7 additions and 6 deletions

View file

@ -9,7 +9,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
implicitWidth: icon.implicitWidth + info.implicitWidth + info.anchors.leftMargin implicitWidth: icon.implicitWidth + info.implicitWidth + info.anchors.leftMargin
implicitHeight: Math.max(icon.implicitHeight, info.implicitHeight) + Tokens.padding.largeIncreased implicitHeight: Math.max(icon.implicitHeight, info.implicitHeight) + Tokens.padding.largeIncreased * 2
Component.onCompleted: Weather.reload() Component.onCompleted: Weather.reload()
@ -22,7 +22,7 @@ Item {
animate: true animate: true
text: Weather.icon text: Weather.icon
color: Colours.palette.m3secondary color: Colours.palette.m3secondary
fontStyle: Tokens.font.icon.builders.extraLarge.scale(2).build() fontStyle: Tokens.font.icon.builders.extraLarge.scale(1.8).build()
} }
Column { Column {
@ -32,7 +32,7 @@ Item {
anchors.left: icon.right anchors.left: icon.right
anchors.leftMargin: Tokens.spacing.largeIncreased anchors.leftMargin: Tokens.spacing.largeIncreased
spacing: Tokens.spacing.small spacing: Tokens.spacing.extraSmall
StyledText { StyledText {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
@ -40,7 +40,7 @@ Item {
animate: true animate: true
text: Weather.temp text: Weather.temp
color: Colours.palette.m3primary color: Colours.palette.m3primary
font: Tokens.font.body.builders.large.size(28).weight(Font.Medium).build() font: Tokens.font.headline.builders.large.width(110).weight(Font.DemiBold).build()
} }
StyledText { StyledText {
@ -48,6 +48,7 @@ Item {
animate: true animate: true
text: Weather.description text: Weather.description
font: Tokens.font.body.builders.medium.weight(Font.Medium).build()
elide: Text.ElideRight elide: Text.ElideRight
width: Math.min(implicitWidth, root.parent.width - icon.implicitWidth - info.anchors.leftMargin - Tokens.padding.extraLargeIncreased) width: Math.min(implicitWidth, root.parent.width - icon.implicitWidth - info.anchors.leftMargin - Tokens.padding.extraLargeIncreased)

View file

@ -177,7 +177,7 @@ class DashboardTokens : public ConfigObject {
CONFIG_PROPERTY(int, tabIndicatorHeight, 3) CONFIG_PROPERTY(int, tabIndicatorHeight, 3)
CONFIG_PROPERTY(int, tabIndicatorSpacing, 5) CONFIG_PROPERTY(int, tabIndicatorSpacing, 5)
CONFIG_PROPERTY(int, userWidth, 320) CONFIG_PROPERTY(int, userWidth, 340)
CONFIG_PROPERTY(int, logoSize, 30) CONFIG_PROPERTY(int, logoSize, 30)
CONFIG_PROPERTY(int, uptimeSize, 30) CONFIG_PROPERTY(int, uptimeSize, 30)
CONFIG_PROPERTY(int, bubbleSize, 8) CONFIG_PROPERTY(int, bubbleSize, 8)
@ -186,7 +186,7 @@ class DashboardTokens : public ConfigObject {
CONFIG_PROPERTY(int, mediaProgressSweep, 180) CONFIG_PROPERTY(int, mediaProgressSweep, 180)
CONFIG_PROPERTY(int, mediaProgressThickness, 8) CONFIG_PROPERTY(int, mediaProgressThickness, 8)
CONFIG_PROPERTY(int, resourceProgressThickness, 10) CONFIG_PROPERTY(int, resourceProgressThickness, 10)
CONFIG_PROPERTY(int, weatherWidth, 250) CONFIG_PROPERTY(int, weatherWidth, 275)
CONFIG_PROPERTY(int, mediaCoverArtSize, 150) CONFIG_PROPERTY(int, mediaCoverArtSize, 150)
CONFIG_PROPERTY(int, mediaVisualiserSize, 80) CONFIG_PROPERTY(int, mediaVisualiserSize, 80)
CONFIG_PROPERTY(int, resourceSize, 200) CONFIG_PROPERTY(int, resourceSize, 200)