fix: no battery icon unless actually have battery
This commit is contained in:
@@ -15,13 +15,7 @@ Rectangle {
|
|||||||
property int battPercent: 58
|
property int battPercent: 58
|
||||||
implicitWidth: itemContent.width + 8
|
implicitWidth: itemContent.width + 8
|
||||||
implicitHeight: 24
|
implicitHeight: 24
|
||||||
enabled: {
|
visible: {if (UPower.displayDevice.ready) { true } else {false}}
|
||||||
if (UPower.displayDevice != null) {
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
radius: 5.5
|
radius: 5.5
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
color: "#2a2a2a" // Define item color
|
color: "#2a2a2a" // Define item color
|
||||||
@@ -32,7 +26,7 @@ Rectangle {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
Text {
|
Text {
|
||||||
// anchors.centerIn: parent
|
// anchors.centerIn: parent
|
||||||
text: "58%"
|
text: UPower.displayDevice.percentage + "%"
|
||||||
color: Common.Colors.colors.primary
|
color: Common.Colors.colors.primary
|
||||||
font.weight: Font.DemiBold
|
font.weight: Font.DemiBold
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
|
|||||||
Reference in New Issue
Block a user