mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
popupMenu: Ensure that submenus are properly hidden when insensitive
We don't actually propagate sensitivity information to submenus; we simply make sure that they can never be open when the parent is insensitive. https://bugzilla.gnome.org/show_bug.cgi?id=702539
This commit is contained in:
parent
86835db8f2
commit
4b889eac32
1 changed files with 7 additions and 0 deletions
|
|
@ -1340,6 +1340,13 @@ const PopupSubMenuMenuItem = new Lang.Class({
|
|||
this.menu.connect('open-state-changed', Lang.bind(this, this._subMenuOpenStateChanged));
|
||||
},
|
||||
|
||||
syncSensitive: function() {
|
||||
let sensitive = this.parent();
|
||||
this._triangle.visible = sensitive;
|
||||
if (!sensitive)
|
||||
this.menu.close(false);
|
||||
},
|
||||
|
||||
_subMenuOpenStateChanged: function(menu, open) {
|
||||
if (open)
|
||||
this.actor.add_style_pseudo_class('open');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue