From bdc7b6917cdf0ed7f14e55aeada0bd1ddf11ae44 Mon Sep 17 00:00:00 2001 From: Honney Date: Tue, 9 Jun 2026 21:44:54 +0200 Subject: [PATCH] fix battery charging --- modules/bar/widgets/Battery.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/bar/widgets/Battery.qml b/modules/bar/widgets/Battery.qml index c482b0c..24fbee3 100644 --- a/modules/bar/widgets/Battery.qml +++ b/modules/bar/widgets/Battery.qml @@ -42,14 +42,26 @@ MouseArea { font.pixelSize: Config.big_font_size(bar.height) font.family: Config.font color: ( - BatteryState.charging ? BatteryState.percentage == 100 ? "white" : "green" : - BatteryState.percentage <= 5 ? "red" : + BatteryState.charging ? BatteryState.percentage == 100 ? "white" : Colors.tertiary : + BatteryState.percentage <= 5 ? Colors.errorContainer : BatteryState.percentage < 10 ? "yellow" : batteryButton.containsMouse ? Colors.tertiary_fg : Colors.primary ) } + Text { + id: batteryChargingText + visible : !clicked && BatteryState.charging + anchors.centerIn: parent + text: "󱐋" + font.pixelSize: Config.big_font_size(bar.height) + font.family: Config.font + style: Text.Outline + styleColor: Qt.alpha(Colors.tertiaryContainer, 0.5) + color: Colors.tertiary + } + Row { id: batteryPercentageRow visible: clicked