From bc8965fe639df0acc9787c6593f5131e018477f2 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 12 Oct 2012 14:09:26 -0400 Subject: [PATCH] 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 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/overview.js b/js/ui/overview.js index 41289f12a..16fbcc878 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;