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.
This commit is contained in:
@@ -10,6 +10,7 @@ const St = imports.gi.St;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const Gdk = imports.gi.Gdk;
|
const Gdk = imports.gi.Gdk;
|
||||||
|
|
||||||
|
const CenterLayout = imports.ui.centerLayout;
|
||||||
const Dash = imports.ui.dash;
|
const Dash = imports.ui.dash;
|
||||||
const DND = imports.ui.dnd;
|
const DND = imports.ui.dnd;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@@ -124,7 +125,10 @@ const Overview = new Lang.Class({
|
|||||||
vertical: true });
|
vertical: true });
|
||||||
this._overview._delegate = this;
|
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._scrollDirection = SwipeScrollDirection.NONE;
|
||||||
this._scrollAdjustment = null;
|
this._scrollAdjustment = null;
|
||||||
|
Reference in New Issue
Block a user