diff --git a/config/modules/quickshell/quickshell/BatteryWidget.qml b/config/modules/quickshell/quickshell/BatteryWidget.qml index 6548859..fb137aa 100644 --- a/config/modules/quickshell/quickshell/BatteryWidget.qml +++ b/config/modules/quickshell/quickshell/BatteryWidget.qml @@ -3,29 +3,21 @@ import QtQuick.Layouts import Quickshell import Quickshell.Services.UPower -Item { - id: root - // enabled: uPowerExists - width: content.width - height: content.height - Layout.alignment: Qt.AlignCenter - RowLayout { - id: content - height: 20 - anchors.centerIn: root - Rectangle { - height: text.height - width: text.width - color: Colors.backgroundAlt - Layout.alignment: Qt.AlignCenter - Text { - property int power: UPower.displayDevice.percentage * 100 - - id: text - anchors.centerIn: parent - text: power - color: Colors.textPrimary - } +RowLayout { + id: content + height: 20 + anchors.centerIn: root + Rectangle { + implicitHeight: text.height + implicitWidth: text.width + color: Colors.backgroundAlt + Layout.alignment: Qt.AlignCenter + Text { + id: text + property int power: UPower.displayDevice.percentage * 100 + anchors.centerIn: parent + text: power + "%" + color: Colors.textPrimary } } }