diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-24 21:27:16 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-24 21:27:16 +0800 |
| commit | e8adf58097ad869b5eb073cc822b7f8ab4e67618 (patch) | |
| tree | d89e9803f768ca7095e8fd6dc94c045af1070903 | |
| parent | dashboard: fix sizing issues (diff) | |
| download | caelestia-shell-e8adf58097ad869b5eb073cc822b7f8ab4e67618.tar.gz caelestia-shell-e8adf58097ad869b5eb073cc822b7f8ab4e67618.tar.bz2 caelestia-shell-e8adf58097ad869b5eb073cc822b7f8ab4e67618.zip | |
bar: fix battery charging icons
| -rw-r--r-- | modules/bar/components/StatusIcons.qml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/bar/components/StatusIcons.qml b/modules/bar/components/StatusIcons.qml index 17cc892..a6ad443 100644 --- a/modules/bar/components/StatusIcons.qml +++ b/modules/bar/components/StatusIcons.qml @@ -87,7 +87,9 @@ Item { const charging = device.changeRate >= 0; if (perc === 1) return charging ? "battery_charging_full" : "battery_full"; - const level = Math.floor(perc * 7); + let level = Math.floor(perc * 7); + if (charging && (level === 4 || level === 1)) + level--; return charging ? `battery_charging_${(level + 3) * 10}` : `battery_${level}_bar`; } color: UPower.displayDevice.percentage > 0.2 ? root.colour : Colours.palette.m3error |