summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-04 21:54:25 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-04 21:54:25 +1000
commit5ab986eba448f1c469d5adfe353d5830c3d343ab (patch)
tree84a61cda31c7a3d9c7297efa3bc66cc96d81ffa5 /modules
parentsystemusage: reorder gpu detection (diff)
downloadcaelestia-shell-5ab986eba448f1c469d5adfe353d5830c3d343ab.tar.gz
caelestia-shell-5ab986eba448f1c469d5adfe353d5830c3d343ab.tar.bz2
caelestia-shell-5ab986eba448f1c469d5adfe353d5830c3d343ab.zip
dashboard: display correct temp units
Diffstat (limited to 'modules')
-rw-r--r--modules/dashboard/Performance.qml8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/dashboard/Performance.qml b/modules/dashboard/Performance.qml
index f19ea4b..4717b30 100644
--- a/modules/dashboard/Performance.qml
+++ b/modules/dashboard/Performance.qml
@@ -9,6 +9,10 @@ RowLayout {
readonly property int padding: Appearance.padding.large
+ function displayTemp(temp: real): string {
+ return `${Math.ceil(Config.services.useFahrenheit ? temp * 1.8 + 32 : temp)}°${Config.services.useFahrenheit ? "F" : "C"}`;
+ }
+
spacing: Appearance.spacing.large * 3
Ref {
@@ -24,7 +28,7 @@ RowLayout {
value1: Math.min(1, SystemUsage.gpuTemp / 90)
value2: SystemUsage.gpuPerc
- label1: `${Math.ceil(SystemUsage.gpuTemp)}°C`
+ label1: root.displayTemp(SystemUsage.gpuTemp)
label2: `${Math.round(SystemUsage.gpuPerc * 100)}%`
sublabel1: qsTr("GPU temp")
@@ -41,7 +45,7 @@ RowLayout {
value1: Math.min(1, SystemUsage.cpuTemp / 90)
value2: SystemUsage.cpuPerc
- label1: `${Math.ceil(SystemUsage.cpuTemp)}°C`
+ label1: root.displayTemp(SystemUsage.cpuTemp)
label2: `${Math.round(SystemUsage.cpuPerc * 100)}%`
sublabel1: qsTr("CPU temp")