fix Battery readonly Behavior
This commit is contained in:
parent
bdd77fb947
commit
6d4230b8cf
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ M.BarSection {
|
||||||
readonly property var dev: UPower.displayDevice
|
readonly property var dev: UPower.displayDevice
|
||||||
readonly property real pct: (dev?.percentage ?? 0) * 100
|
readonly property real pct: (dev?.percentage ?? 0) * 100
|
||||||
readonly property bool charging: dev?.state === UPowerDeviceState.Charging
|
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 } }
|
Behavior on _stateColor { ColorAnimation { duration: 300 } }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue