[gnome-shell/wip/re-search: 142/151] overview: Center the main overview group accordingly



commit bc8965fe639df0acc9787c6593f5131e018477f2
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.

 js/ui/overview.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 41289f1..16fbcc8 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;
@@ -124,7 +125,10 @@ const Overview = new Lang.Class({
                                             vertical: true });
         this._overview._delegate = this;
 
-        this._group = new St.BoxLayout({ name: 'overview-group' });
+        let layout = new CenterLayout.CenterLayout();
+        CenterLayout.connectSpacing(layout);
+        this._group = new St.Widget({ name: 'overview-group',
+                                      layout_manager: layout });
 
         this._scrollDirection = SwipeScrollDirection.NONE;
         this._scrollAdjustment = null;



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