fix: no battery icon unless actually have battery
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user