endSessionDialog: hide app list when there are no apps
We don't want its padding to show up when it shouldn't be visible. https://bugzilla.gnome.org/show_bug.cgi?id=641375
This commit is contained in:
parent
40750f2dc6
commit
7dcd2313d8
@ -288,12 +288,26 @@ EndSessionDialog.prototype = {
|
|||||||
this.contentLayout.add(scrollView,
|
this.contentLayout.add(scrollView,
|
||||||
{ x_fill: true,
|
{ x_fill: true,
|
||||||
y_fill: true });
|
y_fill: true });
|
||||||
|
scrollView.hide();
|
||||||
|
|
||||||
this._applicationList = new St.BoxLayout({ vertical: true });
|
this._applicationList = new St.BoxLayout({ vertical: true });
|
||||||
scrollView.add_actor(this._applicationList,
|
scrollView.add_actor(this._applicationList,
|
||||||
{ x_fill: true,
|
{ x_fill: true,
|
||||||
y_fill: true,
|
y_fill: true,
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
y_align: St.Align.MIDDLE });
|
y_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
|
this._applicationList.connect('actor-added',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
if (this._applicationList.get_children().length == 1)
|
||||||
|
scrollView.show();
|
||||||
|
}));
|
||||||
|
|
||||||
|
this._applicationList.connect('actor-removed',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
if (this._applicationList.get_children().length == 0)
|
||||||
|
scrollView.hide();
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy: function() {
|
_onDestroy: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user