Battery: add visual indicator for low battery (same as SysMon)

This commit is contained in:
Ly-sec
2025-11-21 13:27:03 +01:00
parent 5ed4c97ee5
commit e46c9cdf0e
4 changed files with 20 additions and 7 deletions
+6
View File
@@ -20,6 +20,8 @@ Item {
property bool oppositeDirection: false
property bool hovered: false
property bool rotateText: false
property color customBackgroundColor: Qt.rgba(0, 0, 0, 0)
property color customTextIconColor: Qt.rgba(0, 0, 0, 0)
readonly property string barPosition: Settings.data.bar.position
readonly property bool isVerticalBar: barPosition === "left" || barPosition === "right"
@@ -57,6 +59,8 @@ Item {
hovered: root.hovered
density: root.density
rotateText: root.rotateText
customBackgroundColor: root.customBackgroundColor
customTextIconColor: root.customTextIconColor
onShown: root.shown()
onHidden: root.hidden()
onEntered: root.entered()
@@ -82,6 +86,8 @@ Item {
oppositeDirection: root.oppositeDirection
hovered: root.hovered
density: root.density
customBackgroundColor: root.customBackgroundColor
customTextIconColor: root.customTextIconColor
onShown: root.shown()
onHidden: root.hidden()
onEntered: root.entered()