From ca7b165eb87befaf12141feb2446577fa8ae5f66 Mon Sep 17 00:00:00 2001 From: bbedward Date: Sun, 23 Aug 2026 18:39:30 -0400 Subject: [PATCH] battery: use theme font weight in horizontal mode --- quickshell/Modules/DankBar/Widgets/Battery.qml | 2 +- quickshell/Modules/DankBar/Widgets/Weather.qml | 2 +- quickshell/Modules/DankIsland/Activities/HomeCompact.qml | 5 +---- quickshell/Modules/DankIsland/Activities/MediaCompact.qml | 6 +++--- quickshell/Widgets/BatteryMeter.qml | 5 ----- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/quickshell/Modules/DankBar/Widgets/Battery.qml b/quickshell/Modules/DankBar/Widgets/Battery.qml index d7761c437..61fa1bde7 100644 --- a/quickshell/Modules/DankBar/Widgets/Battery.qml +++ b/quickshell/Modules/DankBar/Widgets/Battery.qml @@ -199,7 +199,7 @@ BasePill { isMonospace: false text: battery.horizontalSideText reserveText: battery.horizontalSideText.replace(/\d/g, "0") - width: reservedWidth + width: Math.ceil(Math.max(implicitWidth, reservedWidth)) horizontalAlignment: Text.AlignHCenter font.pixelSize: Theme.barTextSize(battery.barThickness, battery.barConfig?.fontScale, battery.barConfig?.maximizeWidgetText) color: Theme.widgetTextColor diff --git a/quickshell/Modules/DankBar/Widgets/Weather.qml b/quickshell/Modules/DankBar/Widgets/Weather.qml index 7e01f36c3..4d12a7e70 100644 --- a/quickshell/Modules/DankBar/Widgets/Weather.qml +++ b/quickshell/Modules/DankBar/Widgets/Weather.qml @@ -67,7 +67,7 @@ BasePill { isMonospace: false text: WeatherService.currentTempText(false) reserveText: text.replace(/\d/g, "0") - width: reservedWidth + width: Math.ceil(Math.max(implicitWidth, reservedWidth)) horizontalAlignment: Text.AlignHCenter font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText) color: Theme.widgetTextColor diff --git a/quickshell/Modules/DankIsland/Activities/HomeCompact.qml b/quickshell/Modules/DankIsland/Activities/HomeCompact.qml index 3fe3b3ba9..d29452007 100644 --- a/quickshell/Modules/DankIsland/Activities/HomeCompact.qml +++ b/quickshell/Modules/DankIsland/Activities/HomeCompact.qml @@ -120,11 +120,10 @@ Item { isMonospace: false text: root.timeText reserveText: root.timeText.replace(/\d/g, "0") - width: reservedWidth + width: Math.ceil(Math.max(implicitWidth, reservedWidth)) horizontalAlignment: Text.AlignHCenter color: Theme.surfaceText font.pixelSize: Theme.fontSizeSmall - font.weight: Font.DemiBold } ClusterDot { @@ -147,7 +146,6 @@ Item { text: root.dateText color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall - font.weight: Font.Medium } } } @@ -220,7 +218,6 @@ Item { text: WeatherService.currentTempText() color: Theme.surfaceTextSecondary font.pixelSize: Theme.fontSizeSmall - font.weight: Font.Medium } } diff --git a/quickshell/Modules/DankIsland/Activities/MediaCompact.qml b/quickshell/Modules/DankIsland/Activities/MediaCompact.qml index 9c28e4d7d..245d90f09 100644 --- a/quickshell/Modules/DankIsland/Activities/MediaCompact.qml +++ b/quickshell/Modules/DankIsland/Activities/MediaCompact.qml @@ -25,7 +25,7 @@ Item { readonly property real measuredWidth: { let width = Theme.spacingS + root.artworkSize + Theme.spacingXS + root.cavaWidth + Theme.spacingXS + root.naturalTextWidth + Theme.spacingXS; if (root.clockVisible) - width += clockText.reservedWidth + Theme.spacingXS * 2 + Theme.spacingS; + width += clockText.width + Theme.spacingXS * 2 + Theme.spacingS; return width; } @@ -128,7 +128,7 @@ Item { rightMargin: Theme.spacingS verticalCenter: parent.verticalCenter } - width: root.clockVisible ? (clockText.reservedWidth + Theme.spacingXS * 2) : 0 + width: root.clockVisible ? (clockText.width + Theme.spacingXS * 2) : 0 height: root.clockPillHeight visible: root.clockVisible @@ -144,7 +144,7 @@ Item { isMonospace: false text: root.timeText reserveText: root.timeText.replace(/\d/g, "0") - width: reservedWidth + width: Math.ceil(Math.max(implicitWidth, reservedWidth)) horizontalAlignment: Text.AlignHCenter color: Theme.surfaceText font.pixelSize: Theme.fontSizeSmall diff --git a/quickshell/Widgets/BatteryMeter.qml b/quickshell/Widgets/BatteryMeter.qml index 899a78396..79fe6ad4d 100644 --- a/quickshell/Widgets/BatteryMeter.qml +++ b/quickshell/Widgets/BatteryMeter.qml @@ -69,7 +69,6 @@ Item { id: fitMetrics font.pixelSize: Math.max(1, root.baseTextSize) - font.weight: Font.Bold text: root.numberText } @@ -77,7 +76,6 @@ Item { id: digitInk font.pixelSize: Math.max(1, root.textSize) - font.weight: Font.Bold text: "0" } @@ -85,7 +83,6 @@ Item { id: signMetrics font.pixelSize: Math.max(1, root.baseTextSize * root.signRatio) - font.weight: Font.Bold text: root.signText } @@ -147,7 +144,6 @@ Item { text: root.numberText color: glyphs.glyphColor font.pixelSize: Math.max(1, root.textSize) - font.weight: Font.Bold } StyledText { @@ -159,7 +155,6 @@ Item { text: root.signText color: glyphs.glyphColor font.pixelSize: root.signSize - font.weight: Font.Bold } Bolt {