PopupMenu: handle submenus inline
Instead of showing submenus on the left side, make PopupSubMenuMenuItem act like an expander. The sub menu is toggled on click, opened on right/enter/space on the parent item, closed on left on any item or when closing the parent menu. https://bugzilla.gnome.org/show_bug.cgi?id=633476
This commit is contained in:
@ -50,7 +50,7 @@ Button.prototype = {
|
||||
if (open) {
|
||||
this.actor.add_style_pseudo_class('pressed');
|
||||
let focus = global.stage.get_key_focus();
|
||||
if (!focus || (focus != this.actor && !menu.contains(focus)))
|
||||
if (!focus || (focus != this.actor && !menu.actor.contains(focus)))
|
||||
this.actor.grab_key_focus();
|
||||
} else
|
||||
this.actor.remove_style_pseudo_class('pressed');
|
||||
|
Reference in New Issue
Block a user