[gnome-shell/T27795: 27/138] bottomPanel: Adapt 'Top Bar' to become 'Bottom Bar' for the Ctrl+Alt+Tab dialog



commit cdeca4bc708d5c0cb7789d58c0fd6b84b68ee0d6
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 935e6acdc4..204eccee9f 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;
@@ -177,6 +178,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(icon, { x_fill: false, y_fill: false } );
 
         let text = new St.Label({ text: item.name });
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 49c0038fac..7f10539462 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -816,8 +816,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]