[gnome-shell/wip/re-search-v2: 20/29] overview: Center the main overview group accordingly



commit a42d87919095c43015a0b1a599cfb4c25df180cd
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Oct 12 14:09:26 2012 -0400

    overview: Center the main overview group accordingly
    
    Using the same logic as the panel which smartly centers everything,
    smartly center the overview contents if we have enough space to do so.

 data/theme/gnome-shell.css |   14 +++-----------
 js/ui/overview.js          |    6 +++++-
 js/ui/searchDisplay.js     |    2 +-
 3 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 2b8bda4..0075886 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -754,18 +754,15 @@ StScrollBar StButton#vhandle:active {
 /* Search Results */
 
 #searchResults {
-    padding: 20px 10px 10px 10px;
     spacing: 18px;
 }
 
 #searchResultsContent {
-    padding-right: 20px;
     spacing: 16px;
-}
 
-#searchResultsContent:rtl {
-    padding-right: 0px;
+    /* for scrollbars */
     padding-left: 20px;
+    padding-right: 20px;
 }
 
 .search-section {
@@ -835,15 +832,10 @@ StScrollBar StButton#vhandle:active {
 }
 
 .all-app {
-    padding: 16px 25px 16px 16px;
+    padding: 16px;
     spacing: 20px;
 }
 
-.all-app:rtl {
-    padding-right: 16px;
-    padding-left: 25px;
-}
-
 .app-filter {
     font-weight: bold;
     height: 2.85em;
diff --git a/js/ui/overview.js b/js/ui/overview.js
index cf2157e..cdc8f72 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -10,6 +10,7 @@ const St = imports.gi.St;
 const Shell = imports.gi.Shell;
 const Gdk = imports.gi.Gdk;
 
+const CenterLayout = imports.ui.centerLayout;
 const Dash = imports.ui.dash;
 const DND = imports.ui.dnd;
 const Main = imports.ui.main;
@@ -141,8 +142,11 @@ const Overview = new Lang.Class({
                                             vertical: true });
         this._overview._delegate = this;
 
+        let layout = new CenterLayout.CenterLayout();
+        this._group = new St.Widget({ name: 'overview-group',
+                                      layout_manager: layout });
+
         this._spacing = 0;
-        this._group = new St.BoxLayout({ name: 'overview-group' });
         this._group.connect('style-changed',
             Lang.bind(this, function() {
                 let node = this._group.get_theme_node();
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index 8230fbd..7b4d406 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -232,7 +232,7 @@ const GridSearchResults = new Lang.Class({
 
         this._grid = new IconGrid.IconGrid({ rowLimit: MAX_GRID_SEARCH_RESULTS_ROWS,
                                              xAlign: St.Align.START });
-        this.actor = new St.Bin({ x_align: St.Align.START });
+        this.actor = new St.Bin({ x_align: St.Align.MIDDLE });
 
         this.actor.set_child(this._grid.actor);
         this._width = 0;



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