diff options
author | Alexander Mikhaylenko <exalm7659@gmail.com> | 2019-09-14 12:10:40 +0500 |
---|---|---|
committer | Alexander Mikhaylenko <exalm7659@gmail.com> | 2019-09-14 12:17:46 +0500 |
commit | 35aa7998bc597133a4bbd369d4a423924e20937d (patch) | |
tree | 9dd75393d163fa4420343e2065f7fd15e263914d | |
parent | 314a89a8375572b2e23d0ca9efe3a8f8d7b78f9c (diff) | |
download | gnome-shell-wip/exalm/battery.tar.gz |
power: Ceil percentage when looking for iconwip/exalm/battery
Use correct battery icon. For example, use battery-level-10-symbolic, with
a warning, on 1%-10% instead of 10%-19%.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1617
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/726
-rw-r--r-- | js/ui/status/power.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/ui/status/power.js b/js/ui/status/power.js index 486a7fdd3..aa6080d0d 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -110,7 +110,7 @@ var Indicator = class extends PanelMenu.SystemIndicator { // The icons let chargingState = this._proxy.State == UPower.DeviceState.CHARGING ? '-charging' : ''; - let fillLevel = 10 * Math.floor(this._proxy.Percentage / 10); + let fillLevel = 10 * Math.ceil(this._proxy.Percentage / 10); let icon = this._proxy.State == UPower.DeviceState.FULLY_CHARGED ? 'battery-level-100-charged-symbolic' : `battery-level-${fillLevel}${chargingState}-symbolic`; |