fix battery charging

This commit is contained in:
Honney
2026-06-09 21:44:54 +02:00
parent edba9cc928
commit bdc7b6917c
+14 -2
View File
@@ -42,14 +42,26 @@ MouseArea {
font.pixelSize: Config.big_font_size(bar.height)
font.family: Config.font
color: (
BatteryState.charging ? BatteryState.percentage == 100 ? "white" : "green" :
BatteryState.percentage <= 5 ? "red" :
BatteryState.charging ? BatteryState.percentage == 100 ? "white" : Colors.tertiary :
BatteryState.percentage <= 5 ? Colors.errorContainer :
BatteryState.percentage < 10 ? "yellow" :
batteryButton.containsMouse ? Colors.tertiary_fg :
Colors.primary
)
}
Text {
id: batteryChargingText
visible : !clicked && BatteryState.charging
anchors.centerIn: parent
text: "󱐋"
font.pixelSize: Config.big_font_size(bar.height)
font.family: Config.font
style: Text.Outline
styleColor: Qt.alpha(Colors.tertiaryContainer, 0.5)
color: Colors.tertiary
}
Row {
id: batteryPercentageRow
visible: clicked