added lightning bolt

This commit is contained in:
2026-09-17 00:32:35 -05:00
parent 114d7d546c
commit 6931b0f8b5
3 changed files with 93 additions and 21 deletions
+32 -3
View File
@@ -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"