appDisplay: Add intermediate stack widget to hold folder popups
AllView will be updated to allow app folders in addition to app launchers. Folders will pop up in the existing view, so add an additional stack widget into the hierarchy which popups will use as parent. https://bugzilla.gnome.org/show_bug.cgi?id=694192
This commit is contained in:
parent
426b227f03
commit
25d8debb11
@ -101,7 +101,9 @@ const AllView = new Lang.Class({
|
|||||||
this.parent();
|
this.parent();
|
||||||
|
|
||||||
let box = new St.BoxLayout({ vertical: true });
|
let box = new St.BoxLayout({ vertical: true });
|
||||||
box.add(this._grid.actor, { y_align: St.Align.START, expand: true });
|
this._stack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
|
this._stack.add_actor(this._grid.actor);
|
||||||
|
box.add(this._stack, { y_align: St.Align.START, expand: true });
|
||||||
|
|
||||||
this.actor = new St.ScrollView({ x_fill: true,
|
this.actor = new St.ScrollView({ x_fill: true,
|
||||||
y_fill: false,
|
y_fill: false,
|
||||||
@ -141,6 +143,10 @@ const AllView = new Lang.Class({
|
|||||||
Lang.bind(this, this._ensureIconVisible));
|
Lang.bind(this, this._ensureIconVisible));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addFolderPopup: function(popup) {
|
||||||
|
this._stack.add_actor(popup.actor);
|
||||||
|
},
|
||||||
|
|
||||||
_ensureIconVisible: function(icon) {
|
_ensureIconVisible: function(icon) {
|
||||||
let adjustment = this.actor.vscroll.adjustment;
|
let adjustment = this.actor.vscroll.adjustment;
|
||||||
let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values();
|
let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values();
|
||||||
|
Loading…
Reference in New Issue
Block a user