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
55 lines
1.1 KiB
QML
55 lines
1.1 KiB
QML
import QtQuick
|
|
import qs.Modules.Lock.Weather
|
|
import ZShell.Config
|
|
import qs.Components
|
|
import qs.Helpers
|
|
import qs.Services
|
|
|
|
CustomRect {
|
|
id: root
|
|
|
|
required property int rootHeight
|
|
readonly property bool showForecast: rootHeight >= 700
|
|
|
|
color: Colors.tPalette.m3surfaceContainer
|
|
implicitHeight: {
|
|
const base = brief.implicitHeight + brief.anchors.topMargin;
|
|
if (showForecast)
|
|
return base + Tokens.spacing.largeIncreased + forecast.implicitHeight + forecast.anchors.margins;
|
|
return base + brief.anchors.topMargin;
|
|
}
|
|
radius: Tokens.rounding.small
|
|
|
|
Timer {
|
|
interval: 900000 // 15 minutes
|
|
repeat: true
|
|
running: true
|
|
triggeredOnStart: true
|
|
|
|
onTriggered: Weather.reload()
|
|
}
|
|
|
|
BriefInfo {
|
|
id: brief
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.top: parent.top
|
|
anchors.topMargin: Tokens.padding.extraLarge
|
|
rootHeight: root.rootHeight
|
|
}
|
|
|
|
Loader {
|
|
id: forecast
|
|
|
|
active: root.showForecast
|
|
anchors.bottom: parent.bottom
|
|
anchors.left: parent.left
|
|
anchors.margins: Tokens.padding.large
|
|
anchors.right: parent.right
|
|
asynchronous: true
|
|
|
|
sourceComponent: Forecast {
|
|
}
|
|
}
|
|
}
|