RegionTab: add city & timezone display toggle

This commit is contained in:
Ly-sec
2026-01-05 15:42:44 +01:00
parent 5fb38b97f9
commit fd4a8fc44a
20 changed files with 179 additions and 45 deletions
+3 -1
View File
@@ -92,6 +92,8 @@ Rectangle {
return "";
if (!root.weatherReady)
return I18n.tr("calendar.weather.loading");
if (Settings.data.location.hideWeatherCityName)
return "";
const chunks = Settings.data.location.name.split(",");
return chunks[0];
}
@@ -102,7 +104,7 @@ Rectangle {
}
NText {
text: root.weatherReady ? ` (${LocationService.data.weather.timezone_abbreviation})` : ""
text: root.weatherReady && !Settings.data.location.hideWeatherTimezone ? ` (${LocationService.data.weather.timezone_abbreviation})` : ""
pointSize: Style.fontSizeXS
color: Qt.alpha(Color.mOnPrimary, 0.7)
}
+2 -2
View File
@@ -102,7 +102,7 @@ NBox {
}
pointSize: Style.fontSizeL
font.weight: Style.fontWeightBold
visible: showLocation
visible: showLocation && !Settings.data.location.hideWeatherCityName
}
RowLayout {
@@ -129,7 +129,7 @@ NBox {
text: weatherReady ? `(${LocationService.data.weather.timezone_abbreviation})` : ""
pointSize: Style.fontSizeXS
color: Color.mOnSurfaceVariant
visible: LocationService.data.weather && showLocation
visible: LocationService.data.weather && showLocation && !Settings.data.location.hideWeatherTimezone
}
}
}