popupMenu: don't include hidden items in the width computation

https://bugzilla.gnome.org/show_bug.cgi?id=621707
This commit is contained in:
Dan Winship 2011-03-10 11:59:50 -05:00
parent 30d2cfdf56
commit e375e1789b

View File

@ -824,6 +824,8 @@ PopupMenuBase.prototype = {
let columnWidths = [];
let items = this.box.get_children();
for (let i = 0; i < items.length; i++) {
if (!items[i].visible)
continue;
if (items[i]._delegate instanceof PopupBaseMenuItem || items[i]._delegate instanceof PopupMenuBase) {
let itemColumnWidths = items[i]._delegate.getColumnWidths();
for (let j = 0; j < itemColumnWidths.length; j++) {