diff --git a/js/ui/status/power.js b/js/ui/status/power.js index cd1c01d86..8ffb0c631 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -107,10 +107,20 @@ var Indicator = class extends PanelMenu.SystemIndicator { } // The icons - let icon = this._proxy.IconName; + let chargingState = this._proxy.State == UPower.DeviceState.CHARGING + ? '-charging' : ''; + let fillLevel = 10 * Math.floor(this._proxy.Percentage / 10); + let icon = this._proxy.State == UPower.DeviceState.FULLY_CHARGED + ? 'battery-level-100-charged-symbolic' + : `battery-level-${fillLevel}${chargingState}-symbolic`; + this._indicator.icon_name = icon; this._item.icon.icon_name = icon; + let fallbackIcon = this._proxy.IconName; + this._indicator.fallback_icon_name = fallbackIcon; + this._item.icon.fallback_icon_name = fallbackIcon; + // The icon label let label; if (this._proxy.State == UPower.DeviceState.FULLY_CHARGED)