mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
RegionTab: add city & timezone display toggle
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user