[gnome-shell] [AppSwitcher] Drop the line wrapping code.



commit 97df305a6d58ff10b3ed6efdc6c1817ebdf163b6
Author: Steve Frécinaux <code istique net>
Date:   Tue Sep 29 23:04:46 2009 +0200

    [AppSwitcher] Drop the line wrapping code.
    
    Also rename _grid into _appsBox as grid is not an appropriate word
    anymore for what this box is.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=590563

 js/ui/altTab.js |   25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 09ed73e..1398340 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -17,9 +17,8 @@ POPUP_BG_COLOR.from_pixel(0x00000080);
 const POPUP_APPICON_BORDER_COLOR = new Clutter.Color();
 POPUP_APPICON_BORDER_COLOR.from_pixel(0xffffffff);
 
-const POPUP_GRID_SPACING = 8;
+const POPUP_APPS_BOX_SPACING = 8;
 const POPUP_ICON_SIZE = 48;
-const POPUP_NUM_COLUMNS = 5;
 
 const POPUP_POINTER_SELECTION_THRESHOLD = 3;
 
@@ -30,20 +29,18 @@ function AltTabPopup() {
 AltTabPopup.prototype = {
     _init : function() {
         this.actor = new Big.Box({ background_color : POPUP_BG_COLOR,
-                                   corner_radius: POPUP_GRID_SPACING,
-                                   padding: POPUP_GRID_SPACING,
-                                   spacing: POPUP_GRID_SPACING,
+                                   corner_radius: POPUP_APPS_BOX_SPACING,
+                                   padding: POPUP_APPS_BOX_SPACING,
+                                   spacing: POPUP_APPS_BOX_SPACING,
                                    orientation: Big.BoxOrientation.VERTICAL,
                                    reactive: true });
         this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
 
-        // Icon grid.  TODO: Investigate Nbtk.Grid once that lands.  Currently
-        // just implemented using a chain of Big.Box.
-        this._grid = new Big.Box({ spacing: POPUP_GRID_SPACING,
-                                   orientation: Big.BoxOrientation.VERTICAL });
+        this._appsBox = new Big.Box({ spacing: POPUP_APPS_BOX_SPACING,
+                                      orientation: Big.BoxOrientation.HORIZONTAL });
         let gcenterbox = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL,
                                        x_align: Big.BoxAlignment.CENTER });
-        gcenterbox.append(this._grid, Big.BoxPackFlags.NONE);
+        gcenterbox.append(this._appsBox, Big.BoxPackFlags.NONE);
         this.actor.append(gcenterbox, Big.BoxPackFlags.NONE);
 
         this._icons = [];
@@ -72,13 +69,7 @@ AltTabPopup.prototype = {
         this._icons.push(appIcon);
         this._currentWindows.push(appIcon.windows[0]);
 
-        // Add it to the grid
-        if (!this._gridRow || this._gridRow.get_children().length == POPUP_NUM_COLUMNS) {
-            this._gridRow = new Big.Box({ spacing: POPUP_GRID_SPACING,
-                                          orientation: Big.BoxOrientation.HORIZONTAL });
-            this._grid.append(this._gridRow, Big.BoxPackFlags.NONE);
-        }
-        this._gridRow.append(appIcon.actor, Big.BoxPackFlags.NONE);
+        this._appsBox.append(appIcon.actor, Big.BoxPackFlags.NONE);
     },
 
     show : function(initialSelection) {



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