update to battery.qml

This commit is contained in:
Honney
2026-06-22 13:21:47 +02:00
parent ec8d1045bf
commit 2eae90b6b5
4 changed files with 70 additions and 22 deletions
+68
View File
@@ -117,4 +117,72 @@ MouseArea {
console.log("[Battery] Expanded: " + expanded + ", percentage: " + BatteryState.percentage + "%, charging: " + BatteryState.charging)
}
BarPopup {
id: batteryPopup
anchorItem: batteryButton
anchorHovered: batteryButton.containsMouse
spacingValue: Config.spacing_fun(batteryButton.height)
radiusValue: Config.radius_fun(batteryButton.height)
Column {
spacing: parent.spacing
Text {
text: "percentage: " + BatteryState.percentage + "%"
wrapMode: Text.WordWrap
color: Colors.primary
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Config.font_size_tiny(bar.height)
font.family: Config.font
}
Text {
text: "charging: " + BatteryState.charging
wrapMode: Text.WordWrap
color: Colors.primary
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Config.font_size_tiny(bar.height)
font.family: Config.font
}
Text {
text: "energy: " + BatteryState.energy
wrapMode: Text.WordWrap
color: Colors.primary
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Config.font_size_tiny(bar.height)
font.family: Config.font
}
Text {
text: "voltage: " + BatteryState.voltage
wrapMode: Text.WordWrap
color: Colors.primary
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Config.font_size_tiny(bar.height)
font.family: Config.font
}
Text {
text: "charge_cycle: " + BatteryState.charge_cycle
wrapMode: Text.WordWrap
color: Colors.primary
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Config.font_size_tiny(bar.height)
font.family: Config.font
}
Text {
text: "time_to_empty: " + BatteryState.time_to_empty + "h"
wrapMode: Text.WordWrap
color: Colors.primary
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Config.font_size_tiny(bar.height)
font.family: Config.font
}
Text {
text: "energy_rate: " + BatteryState.energy_rate + "W"
wrapMode: Text.WordWrap
color: Colors.primary
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Config.font_size_tiny(bar.height)
font.family: Config.font
}
}
}
}