update Bat.qml to show charging bolt when charging
This commit is contained in:
parent
02e15dac62
commit
f84a6ce49c
1 changed files with 2 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ Rectangle {
|
||||||
visible: UPower.displayDevice.isLaptopBattery
|
visible: UPower.displayDevice.isLaptopBattery
|
||||||
property double percent: UPower.displayDevice.percentage * 100
|
property double percent: UPower.displayDevice.percentage * 100
|
||||||
property bool hasBattery: UPower.displayDevice.isLaptopBattery
|
property bool hasBattery: UPower.displayDevice.isLaptopBattery
|
||||||
property bool charging: UPower.displayDevice.state == UPowerDeviceState.Charging
|
property bool charging: UPower.displayDevice.state === UPowerDeviceState.Charging
|
||||||
required property double moduleHeight
|
required property double moduleHeight
|
||||||
implicitHeight: moduleHeight
|
implicitHeight: moduleHeight
|
||||||
implicitWidth: batLayout.implicitWidth + 16
|
implicitWidth: batLayout.implicitWidth + 16
|
||||||
|
|
@ -38,7 +38,7 @@ Rectangle {
|
||||||
id: batLayout
|
id: batLayout
|
||||||
anchors.centerIn: root
|
anchors.centerIn: root
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
text: root.batteryIcon()
|
text: root.batteryIcon(root.percent, root.charging)
|
||||||
}
|
}
|
||||||
StyledText {
|
StyledText {
|
||||||
text: Math.floor(root.percent) + "%"
|
text: Math.floor(root.percent) + "%"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue