screenShield: Remove erroneous top/bottom padding that may appear
If there are either no resident or persistent notifications, we'll add some spacing for those boxes that may contain nothing. Make them invisible to remove the spacing for those elements. It's possible that we may want to be smarter about this in StBoxLayout to remove spacing for zero-sized actors, but today is not the day. https://bugzilla.gnome.org/show_bug.cgi?id=685919
This commit is contained in:
parent
d90bf5c6dc
commit
cf0ae8f182
@ -126,13 +126,12 @@ const NotificationsBox = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateVisibility: function() {
|
_updateVisibility: function() {
|
||||||
if (this._residentNotificationBox.get_n_children() > 0) {
|
this._residentNotificationBox.visible = this._residentNotificationBox.get_n_children() > 0;
|
||||||
this.actor.show();
|
this._persistentNotificationBox.visible = this._persistentNotificationBox.get_children().some(function(a) {
|
||||||
return;
|
return a.visible;
|
||||||
}
|
});
|
||||||
|
|
||||||
let children = this._persistentNotificationBox.get_children();
|
this.actor.visible = this._residentNotificationBox.visible || this._persistentNotificationBox.visible;
|
||||||
this.actor.visible = children.some(function(a) { return a.visible; });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_sourceIsResident: function(source) {
|
_sourceIsResident: function(source) {
|
||||||
|
Loading…
Reference in New Issue
Block a user