Files
z-bar-qt/Modules/Dashboard/Dash/Weather.qml
T
zach 7d6f3cc275
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 20s
JS/TS / lint (pull_request) Successful in 22s
Python / static (pull_request) Successful in 57s
Rust / fmt (pull_request) Successful in 1m2s
C++ / build (pull_request) Successful in 2m10s
Rust / build (pull_request) Successful in 1m50s
Rust / clippy (pull_request) Successful in 1m25s
Python / verify (pull_request) Successful in 2m58s
C++ / clang-tidy (pull_request) Successful in 7m8s
initial commit for media widget update + anim tokens restructure
2026-08-18 16:14:41 +02:00

52 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
font.pointSize: 54
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.pointSize: Tokens.font.size.extraLarge
font.weight: 500
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)
}
}
}