mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
popupMenu: Make the section invisible if it has no visible children
https://bugzilla.gnome.org/show_bug.cgi?id=706852
This commit is contained in:
parent
f0da08bbb1
commit
5a0ac6c2ac
1 changed files with 11 additions and 2 deletions
|
|
@ -921,10 +921,19 @@ const PopupMenuSection = new Lang.Class({
|
|||
this.isOpen = true;
|
||||
},
|
||||
|
||||
_syncVisibility: function() {
|
||||
this.actor.visible = !this.isEmpty();
|
||||
},
|
||||
|
||||
// deliberately ignore any attempt to open() or close(), but emit the
|
||||
// corresponding signal so children can still pick it up
|
||||
open: function() { this.emit('open-state-changed', true); },
|
||||
close: function() { this.emit('open-state-changed', false); },
|
||||
open: function() {
|
||||
this._syncVisibility();
|
||||
this.emit('open-state-changed', true);
|
||||
},
|
||||
close: function() {
|
||||
this.emit('open-state-changed', false);
|
||||
},
|
||||
});
|
||||
|
||||
const PopupSubMenuMenuItem = new Lang.Class({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue