From 5ab986eba448f1c469d5adfe353d5830c3d343ab Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 4 Aug 2025 21:54:25 +1000 Subject: dashboard: display correct temp units --- modules/dashboard/Performance.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') 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") -- cgit v1.2.3-freya