From 4be8fc9693e439c487f091413289b782d78130e7 Mon Sep 17 00:00:00 2001 From: Evertiro Date: Fri, 20 Feb 2026 00:32:09 -0600 Subject: feat: allow different systems for weather/performance (#1109) * Allow different systems for weather/performance Signed-off-by: Dan Griffiths * readme: update options Signed-off-by: Dan Griffiths --------- Signed-off-by: Dan Griffiths --- README.md | 1 + config/Config.qml | 1 + config/ServiceConfig.qml | 1 + modules/dashboard/Performance.qml | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c46f423..30c5c16 100644 --- a/README.md +++ b/README.md @@ -596,6 +596,7 @@ default, you must create it manually. "playerAliases": [{ "from": "com.github.th_ch.youtube_music", "to": "YT Music" }], "weatherLocation": "", "useFahrenheit": false, + "useFahrenheitPerformance": false, "useTwelveHourClock": false, "smartScheme": true, "visualiserBars": 45 diff --git a/config/Config.qml b/config/Config.qml index a70da54..8c01014 100644 --- a/config/Config.qml +++ b/config/Config.qml @@ -441,6 +441,7 @@ Singleton { return { weatherLocation: services.weatherLocation, useFahrenheit: services.useFahrenheit, + useFahrenheitPerformance: services.useFahrenheitPerformance, useTwelveHourClock: services.useTwelveHourClock, gpuType: services.gpuType, visualiserBars: services.visualiserBars, diff --git a/config/ServiceConfig.qml b/config/ServiceConfig.qml index d083b7a..29600cc 100644 --- a/config/ServiceConfig.qml +++ b/config/ServiceConfig.qml @@ -4,6 +4,7 @@ import QtQuick JsonObject { property string weatherLocation: "" // A lat,long pair or empty for autodetection, e.g. "37.8267,-122.4233" property bool useFahrenheit: [Locale.ImperialUSSystem, Locale.ImperialSystem].includes(Qt.locale().measurementSystem) + property bool useFahrenheitPerformance: [Locale.ImperialUSSystem, Locale.ImperialSystem].includes(Qt.locale().measurementSystem) property bool useTwelveHourClock: Qt.locale().timeFormat(Locale.ShortFormat).toLowerCase().includes("a") property string gpuType: "" property int visualiserBars: 45 diff --git a/modules/dashboard/Performance.qml b/modules/dashboard/Performance.qml index a4e24c4..e73d8ed 100644 --- a/modules/dashboard/Performance.qml +++ b/modules/dashboard/Performance.qml @@ -13,7 +13,7 @@ Item { readonly property int minWidth: 400 + 400 + Appearance.spacing.normal + 120 + Appearance.padding.large * 2 function displayTemp(temp: real): string { - return `${Math.ceil(Config.services.useFahrenheit ? temp * 1.8 + 32 : temp)}°${Config.services.useFahrenheit ? "F" : "C"}`; + return `${Math.ceil(Config.services.useFahrenheitPerformance ? temp * 1.8 + 32 : temp)}°${Config.services.useFahrenheitPerformance ? "F" : "C"}`; } implicitWidth: Math.max(minWidth, content.implicitWidth) -- cgit v1.2.3-freya