[gnome-shell/eos3.8: 21/255] bottomPanel: make the 'Power' indicator visible when appropriate



commit 9c78366e30298ae01f76bbbe23fd897b012331b0
Author: Cosimo Cecchi <cosimo endlessm com>
Date:   Thu Jun 8 17:11:45 2017 -0700

    bottomPanel: make the 'Power' indicator visible when appropriate
    
    Also, hide the indicator when not on battery instead of using
    the shutdown icon, since we don't have a shutdown option
    inside this menu anymore.
    
    https://phabricator.endlessm.com/T17362
    https://phabricator.endlessm.com/T17546

 js/ui/status/power.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index 624228c39d..321faeab4a 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -101,9 +101,9 @@ class Indicator extends PanelMenu.SystemIndicator {
             this._item.show();
             this._percentageLabel.visible = this._desktopSettings.get_boolean(SHOW_BATTERY_PERCENTAGE);
         } else {
-            // If there's no battery, then we use the power icon.
+            // If there's no battery, then we hide the indicator.
             this._item.hide();
-            this._indicator.icon_name = 'system-shutdown-symbolic';
+            this._indicator.hide();
             this._percentageLabel.hide();
             return;
         }
@@ -131,6 +131,7 @@ class Indicator extends PanelMenu.SystemIndicator {
 
         let fallbackIcon = this._proxy.IconName;
         this._indicator.fallback_icon_name = fallbackIcon;
+        this._indicator.show();
         this._item.icon.fallback_icon_name = fallbackIcon;
 
         // The icon label


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]