From 0202965f65d6f28311ba81bfcd86f33eaf95fb33 Mon Sep 17 00:00:00 2001 From: quadbyte Date: Tue, 12 Aug 2025 10:08:33 -0400 Subject: [PATCH] Nicer weather card --- Modules/SidePanel/WeatherCard.qml | 40 ++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/Modules/SidePanel/WeatherCard.qml b/Modules/SidePanel/WeatherCard.qml index a3041d2..c3de73f 100644 --- a/Modules/SidePanel/WeatherCard.qml +++ b/Modules/SidePanel/WeatherCard.qml @@ -33,35 +33,37 @@ NBox { } ColumnLayout { + + NText { + text: Settings.data.location.name + font.weight: Style.fontWeightBold + font.pointSize: Style.fontSizeXL * scaling + } + RowLayout { NText { - text: Settings.data.location.name - font.weight: Style.fontWeightBold + visible: weatherReady + text: { + if (!weatherReady) { + return "" + } + var temp = Location.data.weather.current_weather.temperature + if (Settings.data.location.useFahrenheit) { + temp = Location.celsiusToFahrenheit(temp) + } + temp = Math.round(temp) + return `${temp}°` + } font.pointSize: Style.fontSizeXL * scaling + font.weight: Style.fontWeightBold } + NText { text: weatherReady ? `(${Location.data.weather.timezone_abbreviation})` : "" font.pointSize: Style.fontSizeSmall * scaling visible: Location.data.weather } } - - NText { - visible: weatherReady - text: { - if (!weatherReady) { - return "" - } - var temp = Location.data.weather.current_weather.temperature - if (Settings.data.location.useFahrenheit) { - temp = Location.celsiusToFahrenheit(temp) - } - temp = Math.round(temp) - return `${temp}°` - } - font.pointSize: Style.fontSizeXL * scaling - font.weight: Style.fontWeightBold - } } }