mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-04 11:16:03 +00:00
fix(bar): Ensure SystemMonitor temperature is fully visible
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.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user