fix Battery readonly Behavior

This commit is contained in:
Damocles 2026-04-12 16:46:58 +02:00
parent bdd77fb947
commit 6d4230b8cf

View file

@ -18,7 +18,7 @@ M.BarSection {
readonly property var dev: UPower.displayDevice
readonly property real pct: (dev?.percentage ?? 0) * 100
readonly property bool charging: dev?.state === UPowerDeviceState.Charging
readonly property color _stateColor: charging ? M.Theme.base0B : pct < 15 ? M.Theme.base08 : pct < 30 ? M.Theme.base09 : M.Theme.base0B
property color _stateColor: charging ? M.Theme.base0B : pct < 15 ? M.Theme.base08 : pct < 30 ? M.Theme.base09 : M.Theme.base0B
Behavior on _stateColor { ColorAnimation { duration: 300 } }