[gnome-shell/T27795: 30/138] bottomPanel: make the 'Power' indicator visible when appropriate
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/T27795: 30/138] bottomPanel: make the 'Power' indicator visible when appropriate
- Date: Tue, 1 Oct 2019 23:31:51 +0000 (UTC)
commit 5c2721c2d58066295f6805b56e36612720bf4ee6
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 486a7fdd35..f3525b6fa8 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -100,9 +100,9 @@ var Indicator = class 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;
}
@@ -127,6 +127,7 @@ var Indicator = class 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]