From bd20dc584fe550d5dc314b676e7b3ce38ce0dacb Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Sun, 28 Dec 2025 00:06:34 +0000 Subject: [PATCH] fix: no battery icon unless actually have battery --- modules/quickshell/quickshell/bar/widgets/Battery.qml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/quickshell/quickshell/bar/widgets/Battery.qml b/modules/quickshell/quickshell/bar/widgets/Battery.qml index 6fd113d..e82e9df 100644 --- a/modules/quickshell/quickshell/bar/widgets/Battery.qml +++ b/modules/quickshell/quickshell/bar/widgets/Battery.qml @@ -15,13 +15,7 @@ Rectangle { property int battPercent: 58 implicitWidth: itemContent.width + 8 implicitHeight: 24 - enabled: { - if (UPower.displayDevice != null) { - true - } else { - false - } - } + visible: {if (UPower.displayDevice.ready) { true } else {false}} radius: 5.5 Layout.alignment: Qt.AlignVCenter color: "#2a2a2a" // Define item color @@ -32,7 +26,7 @@ Rectangle { anchors.centerIn: parent Text { // anchors.centerIn: parent - text: "58%" + text: UPower.displayDevice.percentage + "%" color: Common.Colors.colors.primary font.weight: Font.DemiBold font.pointSize: 12