[gnome-shell] screenShield: Remove erroneous top/bottom padding that may appear
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenShield: Remove erroneous top/bottom padding that may appear
- Date: Thu, 11 Oct 2012 15:26:28 +0000 (UTC)
commit cf0ae8f1824153a593827e1e3ab5b8faa8f1b049
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Oct 10 18:20:16 2012 -0300
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
js/ui/screenShield.js | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 8f480d4..0e5557e 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -126,13 +126,12 @@ const NotificationsBox = new Lang.Class({
},
_updateVisibility: function() {
- if (this._residentNotificationBox.get_n_children() > 0) {
- this.actor.show();
- return;
- }
+ this._residentNotificationBox.visible = this._residentNotificationBox.get_n_children() > 0;
+ this._persistentNotificationBox.visible = this._persistentNotificationBox.get_children().some(function(a) {
+ return a.visible;
+ });
- let children = this._persistentNotificationBox.get_children();
- this.actor.visible = children.some(function(a) { return a.visible; });
+ this.actor.visible = this._residentNotificationBox.visible || this._persistentNotificationBox.visible;
},
_sourceIsResident: function(source) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]