From 44277cd0f31a255deb5b222cab729230136e364f Mon Sep 17 00:00:00 2001 From: bbedward Date: Sat, 9 Aug 2025 00:39:04 -0400 Subject: [PATCH] small tweak to GPU when temp not available --- Modules/ProcessList/SystemOverview.qml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Modules/ProcessList/SystemOverview.qml b/Modules/ProcessList/SystemOverview.qml index fbc6ac69..18797920 100644 --- a/Modules/ProcessList/SystemOverview.qml +++ b/Modules/ProcessList/SystemOverview.qml @@ -323,15 +323,20 @@ Row { text: { if (!SysMonitorService.availableGpus || SysMonitorService.availableGpus.length === 0) { - return "--°" + return "No GPU" } var gpu = SysMonitorService.availableGpus[Math.min( SessionData.selectedGpuIndex, SysMonitorService.availableGpus.length - 1)] var temp = gpu.temperature - return (temp === undefined || temp === null - || temp === 0) ? "--°" : Math.round(temp) + "°" + var hasTemp = temp !== undefined && temp !== null && temp !== 0 + + if (hasTemp) { + return Math.round(temp) + "°" + } else { + return gpu.vendor + } } font.pixelSize: Theme.fontSizeLarge font.family: SettingsData.monoFontFamily @@ -364,7 +369,14 @@ Row { var gpu = SysMonitorService.availableGpus[Math.min( SessionData.selectedGpuIndex, SysMonitorService.availableGpus.length - 1)] - return gpu.vendor + " " + gpu.displayName + var temp = gpu.temperature + var hasTemp = temp !== undefined && temp !== null && temp !== 0 + + if (hasTemp) { + return gpu.vendor + " " + gpu.displayName + } else { + return gpu.displayName + } } font.pixelSize: Theme.fontSizeSmall font.family: SettingsData.monoFontFamily