diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index b320f4dc2..dc5b2cf1c 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1403,6 +1403,8 @@ "weather-hide-timezone-label": "Hide timezone", "weather-show-effects-description": "Show additional visual effects (like rain, snow, or lightning) on the weather card.", "weather-show-effects-label": "Display weather effects", + "weather-talia-mascot-always-description": "Always use Talia emojis instead of tabler icons.", + "weather-talia-mascot-always-label": "Always show Talia weather emojis", "weather-show-in-calendar-description": "Show the daily weather forecast directly in your calendar view.", "weather-show-in-calendar-label": "Display weather in calendar" }, diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 3196ac10c..213f2fd16 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -162,6 +162,7 @@ "name": "", "weatherEnabled": true, "weatherShowEffects": true, + "weatherTaliaMascotAlways": false, "useFahrenheit": false, "use12hourFormat": false, "showWeekNumberInCalendar": false, diff --git a/Assets/settings-search-index.json b/Assets/settings-search-index.json index f0e14de84..7a05103cd 100644 --- a/Assets/settings-search-index.json +++ b/Assets/settings-search-index.json @@ -2231,6 +2231,15 @@ "subTab": 0, "subTabLabel": "common.location" }, + { + "labelKey": "panels.location.weather-talia-mascot-always-label", + "descriptionKey": "panels.location.weather-talia-mascot-always-description", + "widget": "NToggle", + "tab": 17, + "tabLabel": "panels.region.title", + "subTab": 0, + "subTabLabel": "common.location" + }, { "labelKey": "panels.location.weather-hide-city-label", "descriptionKey": "panels.location.weather-hide-city-description", diff --git a/Commons/Settings.qml b/Commons/Settings.qml index ab74f2ac3..eb5b3159d 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -342,6 +342,7 @@ Singleton { property string name: "" property bool weatherEnabled: true property bool weatherShowEffects: true + property bool weatherTaliaMascotAlways: false property bool useFahrenheit: false property bool use12hourFormat: false property bool showWeekNumberInCalendar: false diff --git a/Modules/Cards/WeatherCard.qml b/Modules/Cards/WeatherCard.qml index b161066a6..4e88c5107 100644 --- a/Modules/Cards/WeatherCard.qml +++ b/Modules/Cards/WeatherCard.qml @@ -115,14 +115,14 @@ NBox { readonly property int mainWeatherIconSide: Math.round(Style.fontSizeXXXL * 1.75 * Style.uiScaleRatio * 1.6) NIcon { - visible: !LocationService.taliaWeatherMascotDayActive || !weatherReady + visible: !LocationService.taliaWeatherMascotActive || !weatherReady anchors.centerIn: parent icon: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode, LocationService.data.weather.current_weather.is_day) : "weather-cloud-off" pointSize: Style.fontSizeXXXL * 1.75 color: Color.mPrimary } Loader { - active: LocationService.taliaWeatherMascotDayActive && weatherReady + active: LocationService.taliaWeatherMascotActive && weatherReady anchors.fill: parent asynchronous: true sourceComponent: Component { @@ -216,14 +216,14 @@ NBox { readonly property int forecastWeatherIconSide: Math.round(Style.fontSizeXXL * 1.6 * Style.uiScaleRatio * 1.6) NIcon { - visible: !LocationService.taliaWeatherMascotDayActive + visible: !LocationService.taliaWeatherMascotActive anchors.centerIn: parent icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index]) pointSize: Style.fontSizeXXL * 1.6 color: Color.mPrimary } Loader { - active: LocationService.taliaWeatherMascotDayActive + active: LocationService.taliaWeatherMascotActive anchors.fill: parent asynchronous: true sourceComponent: Component { diff --git a/Modules/DesktopWidgets/Widgets/DesktopWeather.qml b/Modules/DesktopWidgets/Widgets/DesktopWeather.qml index e4e441a8b..81f3a1dd8 100644 --- a/Modules/DesktopWidgets/Widgets/DesktopWeather.qml +++ b/Modules/DesktopWidgets/Widgets/DesktopWeather.qml @@ -62,14 +62,14 @@ DraggableDesktopWidget { Layout.alignment: Qt.AlignVCenter NIcon { - visible: !LocationService.taliaWeatherMascotDayActive || !weatherReady + visible: !LocationService.taliaWeatherMascotActive || !weatherReady anchors.centerIn: parent icon: weatherReady ? LocationService.weatherSymbolFromCode(currentWeatherCode, LocationService.data.weather.current_weather.is_day) : "weather-cloud-off" pointSize: Math.round(Style.fontSizeXXXL * 2 * widgetScale) color: weatherReady ? Color.mPrimary : Color.mOnSurfaceVariant } Loader { - active: LocationService.taliaWeatherMascotDayActive && weatherReady + active: LocationService.taliaWeatherMascotActive && weatherReady anchors.fill: parent asynchronous: true sourceComponent: Component { diff --git a/Modules/LockScreen/LockScreenPanel.qml b/Modules/LockScreen/LockScreenPanel.qml index 7f6a2c5ef..af4056f5f 100644 --- a/Modules/LockScreen/LockScreenPanel.qml +++ b/Modules/LockScreen/LockScreenPanel.qml @@ -495,14 +495,14 @@ Item { readonly property int lockMainWeatherIconSide: Math.round(Style.fontSizeXXXL * Style.uiScaleRatio * 1.6) NIcon { - visible: !LocationService.taliaWeatherMascotDayActive || !weatherReady + visible: !LocationService.taliaWeatherMascotActive || !weatherReady anchors.centerIn: parent icon: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode, LocationService.data.weather.current_weather.is_day) : "weather-cloud-off" pointSize: Style.fontSizeXXXL color: Color.mPrimary } Loader { - active: LocationService.taliaWeatherMascotDayActive && weatherReady + active: LocationService.taliaWeatherMascotActive && weatherReady anchors.fill: parent asynchronous: true sourceComponent: Component { @@ -609,14 +609,14 @@ Item { readonly property int lockForecastWeatherIconSide: Math.round(Style.fontSizeXL * Style.uiScaleRatio * 1.6) NIcon { - visible: !LocationService.taliaWeatherMascotDayActive + visible: !LocationService.taliaWeatherMascotActive anchors.centerIn: parent icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index]) pointSize: Style.fontSizeXL color: Color.mOnSurfaceVariant } Loader { - active: LocationService.taliaWeatherMascotDayActive + active: LocationService.taliaWeatherMascotActive anchors.fill: parent asynchronous: true sourceComponent: Component { diff --git a/Modules/Panels/Settings/Tabs/Region/LocationSubTab.qml b/Modules/Panels/Settings/Tabs/Region/LocationSubTab.qml index bac42536a..7e7c0998b 100644 --- a/Modules/Panels/Settings/Tabs/Region/LocationSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Region/LocationSubTab.qml @@ -129,6 +129,15 @@ ColumnLayout { enabled: Settings.data.location.weatherEnabled } + NToggle { + label: I18n.tr("panels.location.weather-talia-mascot-always-label") + description: I18n.tr("panels.location.weather-talia-mascot-always-description") + checked: Settings.data.location.weatherTaliaMascotAlways + onToggled: checked => Settings.data.location.weatherTaliaMascotAlways = checked + enabled: Settings.data.location.weatherEnabled + defaultValue: Settings.getDefaultValue("location.weatherTaliaMascotAlways") + } + NToggle { label: I18n.tr("panels.location.weather-hide-city-label") description: I18n.tr("panels.location.weather-hide-city-description") diff --git a/Services/Location/LocationService.qml b/Services/Location/LocationService.qml index 03b453425..98e0563aa 100644 --- a/Services/Location/LocationService.qml +++ b/Services/Location/LocationService.qml @@ -22,6 +22,8 @@ Singleton { return d.getMonth() === root.taliaMascotWeatherMonth && d.getDate() === root.taliaMascotWeatherDay; } + readonly property bool taliaWeatherMascotActive: taliaWeatherMascotDayActive || Settings.data.location.weatherTaliaMascotAlways + readonly property alias data: adapter // Stable UI properties - only updated when location is successfully geocoded