1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-13 00:42:49 -05:00

weather: imperial switch not just fahrenheit

fixes #699
This commit is contained in:
bbedward
2025-11-13 17:41:03 -05:00
parent a914e3557f
commit 508dc9db1e
12 changed files with 373 additions and 231 deletions

View File

@@ -16,7 +16,7 @@ Card {
Column {
anchors.centerIn: parent
spacing: Theme.spacingS
visible: !WeatherService.weather.available || WeatherService.weather.temp === 0
visible: !WeatherService.weather.available
DankIcon {
name: "cloud_off"
@@ -46,7 +46,7 @@ Card {
anchors.leftMargin: Theme.spacingL
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.spacingL
visible: WeatherService.weather.available && WeatherService.weather.temp !== 0
visible: WeatherService.weather.available
DankIcon {
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
@@ -61,11 +61,9 @@ Card {
StyledText {
text: {
const temp = SettingsData.useFahrenheit ? WeatherService.weather.tempF : WeatherService.weather.temp;
if (temp === undefined || temp === null || temp === 0) {
return "--°" + (SettingsData.useFahrenheit ? "F" : "C");
}
return temp + "°" + (SettingsData.useFahrenheit ? "F" : "C");
const temp = SettingsData.useFahrenheit ? WeatherService.weather.tempF : WeatherService.weather.temp
if (temp === undefined || temp === null) return "--°" + (SettingsData.useFahrenheit ? "F" : "C")
return temp + "°" + (SettingsData.useFahrenheit ? "F" : "C")
}
font.pixelSize: Theme.fontSizeXLarge + 4
color: Theme.surfaceText