fix battery charging
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user