[gnome-shell/eos3.8: 18/255] bottomPanel: Adapt 'Top Bar' to become 'Bottom Bar' for the Ctrl+Alt+Tab dialog



commit 158373ebd0b1c2ad69ba88ee54a3f97f85f8a03b
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Fri Sep 22 11:34:02 2017 +0100

    bottomPanel: Adapt 'Top Bar' to become 'Bottom Bar' for the Ctrl+Alt+Tab dialog
    
    Change the title and flip the icon vertically to reflect reality.
    
    https://phabricator.endlessm.com/T19368

 js/ui/ctrlAltTab.js | 11 ++++++++++-
 js/ui/panel.js      |  7 +++++--
 2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js
index 46c2a7bf0b..74ec20ffb1 100644
--- a/js/ui/ctrlAltTab.js
+++ b/js/ui/ctrlAltTab.js
@@ -26,7 +26,8 @@ var CtrlAltTabManager = class CtrlAltTabManager {
     addGroup(root, name, icon, params) {
         let item = Params.parse(params, { sortGroup: SortGroup.MIDDLE,
                                           proxy: root,
-                                          focusCallback: null });
+                                          focusCallback: null,
+                                          flipVertical: false });
 
         item.root = root;
         item.name = name;
@@ -178,6 +179,14 @@ class CtrlAltTabSwitcher extends SwitcherPopup.SwitcherList {
             icon = new St.Icon({ icon_name: item.iconName,
                                  icon_size: POPUP_APPICON_SIZE });
         }
+
+        // We need this for the bottom bar's icon, based on the one
+        // from upstream for the top bar.
+        if (item.flipVertical) {
+            icon.set_pivot_point(0.5, 0.5);
+            icon.set_rotation_angle(Clutter.RotateAxis.X_AXIS, 180);
+        }
+
         box.add_child(icon);
 
         let text = new St.Label({
diff --git a/js/ui/panel.js b/js/ui/panel.js
index ec39cebb61..e41d54b9c1 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -823,8 +823,11 @@ class Panel extends St.Widget {
         });
 
         Main.layoutManager.panelBox.add(this);
-        Main.ctrlAltTabManager.addGroup(this, _("Top Bar"), 'focus-top-bar-symbolic',
-                                        { sortGroup: CtrlAltTab.SortGroup.TOP });
+        Main.ctrlAltTabManager.addGroup(
+            this, _("Bottom Bar"), 'focus-top-bar-symbolic', {
+                sortGroup: CtrlAltTab.SortGroup.TOP,
+                flipVertical: true
+        });
 
         Main.sessionMode.connect('updated', this._updatePanel.bind(this));
 


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