diff options
| author | Dylan Myers <131212515+taksyon@users.noreply.github.com> | 2025-10-06 04:51:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-06 19:51:42 +1100 |
| commit | 90c051cfa17bc79e046cbecd1dc87e571e43e787 (patch) | |
| tree | 95a607211b1c181f47a8301059dc1b67c7d6fdc8 /modules/bar/components/StatusIcons.qml | |
| parent | [CI] chore: update flake (diff) | |
| download | caelestia-shell-90c051cfa17bc79e046cbecd1dc87e571e43e787.tar.gz caelestia-shell-90c051cfa17bc79e046cbecd1dc87e571e43e787.tar.bz2 caelestia-shell-90c051cfa17bc79e046cbecd1dc87e571e43e787.zip | |
internal: fix battery charging logic for tray and lock (#751)
* Update StatusIcons.qml --- Fix battery chargiing logic
idk what the difference is in the return value of UPower.onBattery and UPower.displayDevice.state, but the former always returns false after unplugging my laptop. Changing this to the more specific displayDevice.state === 2 fixes this
* Fetch.qml --- Fix battery charging boolean logic
* Use enum value for UPowerDeviceState instead of index
* Use enum value for UPowerDeviceState instead of index
* Update Fetch.qml --- invert battery conditional logic
Diffstat (limited to 'modules/bar/components/StatusIcons.qml')
| -rw-r--r-- | modules/bar/components/StatusIcons.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/bar/components/StatusIcons.qml b/modules/bar/components/StatusIcons.qml index c1ad697..470e381 100644 --- a/modules/bar/components/StatusIcons.qml +++ b/modules/bar/components/StatusIcons.qml @@ -235,7 +235,7 @@ StyledRect { } const perc = UPower.displayDevice.percentage; - const charging = !UPower.onBattery; + const charging = UPower.displayDevice.state === UPowerDeviceState.Charging; if (perc === 1) return charging ? "battery_charging_full" : "battery_full"; let level = Math.floor(perc * 7); |