Calendar: conditional weather card - wip

This commit is contained in:
ItsLemmy
2025-10-30 14:02:42 -04:00
parent 114cbc9f9f
commit ca72a5ca8f
11 changed files with 66 additions and 106 deletions
+5 -1
View File
@@ -9,8 +9,12 @@ import qs.Widgets
NBox {
id: root
property int forecastDays: 7
readonly property bool weatherReady: Settings.data.location.weatherEnabled && (LocationService.data.weather !== null)
visible: Settings.data.location.weatherEnabled
implicitHeight: Math.max(100 * Style.uiScaleRatio, content.implicitHeight + (Style.marginXL * 2))
ColumnLayout {
id: content
anchors.left: parent.left
@@ -87,7 +91,7 @@ NBox {
spacing: Style.marginM
Repeater {
model: weatherReady ? LocationService.data.weather.daily.time : []
model: weatherReady ? Math.min(root.forecastDays, LocationService.data.weather.daily.time.length) : 0
delegate: ColumnLayout {
Layout.fillWidth: true
spacing: Style.marginXS