From 43177b9cf3ce4a0745ce55625c7361e236e7ae2f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 8 Mar 2026 18:45:35 +0100 Subject: [PATCH] hefty: bar: fix popup displaying wrong value --- .../modules/hefty/topLayer/bar/widgets/HSystemInfo.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HSystemInfo.qml b/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HSystemInfo.qml index 04970fc64..a3e81902d 100644 --- a/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HSystemInfo.qml +++ b/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HSystemInfo.qml @@ -147,7 +147,7 @@ HBarWidgetWithPopout { W.CircularProgress { implicitSize: 46 lineWidth: 3 - value: S.Battery.health / 100 + value: S.Battery.percentage W.MaterialSymbol { anchors.centerIn: parent iconSize: 22 @@ -164,17 +164,21 @@ HBarWidgetWithPopout { Layout.fillWidth: true spacing: 0 RowLayout { - visible: S.Battery.knownEnergyRate Layout.fillWidth: true spacing: 4 W.StyledText { Layout.alignment: Qt.AlignBaseline + visible: S.Battery.knownEnergyRate text: F.DateUtils.formatDuration(S.Battery.isCharging ? S.Battery.timeToFull : S.Battery.timeToEmpty) font.pixelSize: C.Appearance.font.pixelSize.title } W.StyledText { Layout.alignment: Qt.AlignBaseline - text: S.Battery.isCharging ? S.Translation.tr("to full") : S.Translation.tr("remaining") + text: { + if (!S.Battery.knownEnergyRate) + return S.Battery.isCharging ? S.Translation.tr("Charging") : S.Translation.tr("Discharging"); + return S.Battery.isCharging ? S.Translation.tr("to full") : S.Translation.tr("remaining"); + } } } RowLayout {