Calendar weather: respect global weather enabled flag.

This commit is contained in:
ItsLemmy
2025-10-30 14:06:36 -04:00
parent ca72a5ca8f
commit db8803d137
+8 -11
View File
@@ -15,7 +15,7 @@ NPanel {
readonly property var now: Time.date
preferredWidth: (Settings.data.location.showWeekNumberInCalendar ? 400 : 380) * Style.uiScaleRatio
preferredHeight: (Settings.data.location.showCalendarWeather ? 600 : 480) * Style.uiScaleRatio
preferredHeight: (Settings.data.location.weatherEnabled && Settings.data.location.showCalendarWeather ? 600 : 420) * Style.uiScaleRatio
panelKeyboardFocus: true
// Helper function to calculate ISO week number
@@ -480,18 +480,15 @@ NPanel {
}
}
NDivider {
visible: Settings.data.location.showCalendarWeather
Loader {
active: Settings.data.location.weatherEnabled && Settings.data.location.showCalendarWeather
Layout.fillWidth: true
Layout.topMargin: Style.marginM
Layout.bottomMargin: Style.marginM
}
WeatherCard {
visible: Settings.data.location.showCalendarWeather
Layout.fillWidth: true
Layout.preferredHeight: implicitHeight
forecastDays: 6
sourceComponent: WeatherCard {
Layout.fillWidth: true
Layout.preferredHeight: implicitHeight
forecastDays: 6
}
}
}
}