added lightning bolt
This commit is contained in:
@@ -54,11 +54,16 @@ Window {
|
||||
// ─────────────────────────────────────────────────────────────
|
||||
|
||||
property int batteryPercent: systemInfo.batteryPercent
|
||||
property bool charging: systemInfo.charging
|
||||
|
||||
Item {
|
||||
id: battery
|
||||
|
||||
width: batteryIcon.width + 18 + batteryText.width
|
||||
width: batteryIcon.width
|
||||
+ (root.charging ? chargingIcon.width + 12 : 0)
|
||||
+ 18
|
||||
+ batteryText.width
|
||||
|
||||
height: 72
|
||||
|
||||
anchors {
|
||||
@@ -134,14 +139,38 @@ Window {
|
||||
}
|
||||
|
||||
Text {
|
||||
id: batteryText
|
||||
id: chargingIcon
|
||||
|
||||
anchors {
|
||||
left: batteryIcon.right
|
||||
leftMargin: 18
|
||||
leftMargin: 12
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
visible: root.charging
|
||||
text: "⚡"
|
||||
|
||||
color: "#ffffff"
|
||||
|
||||
font {
|
||||
pixelSize: 38
|
||||
weight: Font.Bold
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: batteryText
|
||||
|
||||
anchors {
|
||||
left: root.charging
|
||||
? chargingIcon.right
|
||||
: batteryIcon.right
|
||||
|
||||
leftMargin: root.charging ? 12 : 18
|
||||
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
text: root.batteryPercent + "%"
|
||||
|
||||
color: "#ffffff"
|
||||
|
||||
Reference in New Issue
Block a user