diff options
Diffstat (limited to 'modules/dashboard/Performance.qml')
| -rw-r--r-- | modules/dashboard/Performance.qml | 8 |
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") |