fix battery charging
This commit is contained in:
@@ -42,14 +42,26 @@ MouseArea {
|
|||||||
font.pixelSize: Config.big_font_size(bar.height)
|
font.pixelSize: Config.big_font_size(bar.height)
|
||||||
font.family: Config.font
|
font.family: Config.font
|
||||||
color: (
|
color: (
|
||||||
BatteryState.charging ? BatteryState.percentage == 100 ? "white" : "green" :
|
BatteryState.charging ? BatteryState.percentage == 100 ? "white" : Colors.tertiary :
|
||||||
BatteryState.percentage <= 5 ? "red" :
|
BatteryState.percentage <= 5 ? Colors.errorContainer :
|
||||||
BatteryState.percentage < 10 ? "yellow" :
|
BatteryState.percentage < 10 ? "yellow" :
|
||||||
batteryButton.containsMouse ? Colors.tertiary_fg :
|
batteryButton.containsMouse ? Colors.tertiary_fg :
|
||||||
Colors.primary
|
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 {
|
Row {
|
||||||
id: batteryPercentageRow
|
id: batteryPercentageRow
|
||||||
visible: clicked
|
visible: clicked
|
||||||
|
|||||||
Reference in New Issue
Block a user