appDisplay: Make AppFolderDialog subclass St.Bin

It'll simplify things a bit.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
This commit is contained in:
Georges Basile Stavracas Neto 2020-06-04 22:00:10 -03:00
parent c040d08b97
commit 60d7999b6a

View File

@ -1423,10 +1423,9 @@ var AppFolderDialog = GObject.registerClass({
Signals: { Signals: {
'open-state-changed': { param_types: [GObject.TYPE_BOOLEAN] }, 'open-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
}, },
}, class AppFolderDialog extends St.Widget { }, class AppFolderDialog extends St.Bin {
_init(source, folder) { _init(source, folder) {
super._init({ super._init({
layout_manager: new Clutter.BinLayout(),
visible: false, visible: false,
x_expand: true, x_expand: true,
y_expand: true, y_expand: true,
@ -1453,12 +1452,13 @@ var AppFolderDialog = GObject.registerClass({
y_align: Clutter.ActorAlign.FILL, y_align: Clutter.ActorAlign.FILL,
vertical: true, vertical: true,
}); });
this.add_child(new St.Bin({
this.child = new St.Bin({
style_class: 'app-folder-dialog-container', style_class: 'app-folder-dialog-container',
child: this._viewBox, child: this._viewBox,
x_align: Clutter.ActorAlign.CENTER, x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.CENTER,
})); });
this._addFolderNameEntry(); this._addFolderNameEntry();
this._viewBox.add_child(this._view); this._viewBox.add_child(this._view);