[gnome-shell] popupMenu: Don't always ignore SubMenu children in width requests



commit 2ed28211ed8904e1f926020e5273bd2494770315
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu Sep 6 11:43:02 2012 +0200

    popupMenu: Don't always ignore SubMenu children in width requests
    
    Hidden children are currently ignored in width requests; in the
    case of submenu items, this results in abrupt width changes of
    open menus when the corresponding SubMenuMenuItem is toggled.
    To fix, only ignore SubMenu children when the corresponding
    SubMenuMenuItem is hidden as well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683485

 js/ui/popupMenu.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 5f8b999..28be350 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -1100,7 +1100,8 @@ const PopupMenuBase = new Lang.Class({
         let columnWidths = [];
         let items = this.box.get_children();
         for (let i = 0; i < items.length; i++) {
-            if (!items[i].visible)
+            if (!items[i].visible &&
+                !(items[i]._delegate instanceof PopupSubMenu && items[i-1].visible))
                 continue;
             if (items[i]._delegate instanceof PopupBaseMenuItem || items[i]._delegate instanceof PopupMenuBase) {
                 let itemColumnWidths = items[i]._delegate.getColumnWidths();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]