From 355473a94653798dc2a28ce065b5cd2ae1a569e6 Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Mon, 22 Sep 2025 11:26:21 +0800 Subject: [PATCH] fix(bar): Ensure SystemMonitor temperature is fully visible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the vertical bar layout, the temperature text in the SystemMonitor widget (e.g., "55°C") could be truncated due to the widget's fixed width. This commit resolves the issue by applying a dynamic scale transformation to the text component. --- Modules/Bar/Widgets/SystemMonitor.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 5bc5f863..9bd1d1fb 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -120,7 +120,7 @@ Rectangle { columnSpacing: Style.marginXXS * scaling NText { - text: isVertical ? `${SystemStatService.cpuTemp}°` : `${SystemStatService.cpuTemp}°C` + text: `${SystemStatService.cpuTemp}°C` font.family: Settings.data.ui.fontFixed font.pointSize: textSize font.weight: Style.fontWeightMedium @@ -128,6 +128,7 @@ Rectangle { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter color: Color.mPrimary + scale: isVertical ? Math.min(1.0, cpuTempContent.width / implicitWidth) : 1.0 Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 }