Files
z-bar-qt/Modules/Dashboard/Dash/Weather.qml
T
zach 25bee293b0
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 9s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 34s
Rust / build (pull_request) Successful in 1m10s
Python / verify (pull_request) Successful in 1m53s
Rust / fmt (pull_request) Successful in 34s
Rust / clippy (pull_request) Successful in 57s
feat: fontbuilder to streamline font styling
2026-09-21 15:37:45 +02:00

51 lines
1.1 KiB
QML

import QtQuick
import qs.Helpers
import qs.Components
import ZShell.Config
import qs.Services
Item {
id: root
anchors.centerIn: parent
implicitWidth: icon.implicitWidth + info.implicitWidth + info.anchors.leftMargin
Component.onCompleted: Weather.reload()
MaterialIcon {
id: icon
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
animate: true
color: Colors.palette.m3secondary
fontStyle: Tokens.font.icon.extraLarge
text: Weather.icon
}
Column {
id: info
anchors.left: icon.right
anchors.leftMargin: Tokens.spacing.largeIncreased
anchors.verticalCenter: parent.verticalCenter
spacing: 8
CustomText {
anchors.horizontalCenter: parent.horizontalCenter
animate: true
color: Colors.palette.m3primary
font: Tokens.font.body.large
text: Weather.temp
}
CustomText {
anchors.horizontalCenter: parent.horizontalCenter
animate: true
elide: Text.ElideRight
text: Weather.description
width: Math.min(implicitWidth, root.parent.width - icon.implicitWidth - info.anchors.leftMargin - 24 * 2)
}
}
}