GNOME Bugzilla – Bug 683988
Fix insensitive styling for popup menu items
Last modified: 2012-09-13 21:49:57 UTC
The selector for insensitive popup menu items was wrong (a PopupMenuItem is a ShellGenericContainer, not a StButton). Fixing it showed that previous :insensitive tracking was manual for a reason: we have many items that are not reactive, but don't want the insensitive styling (for example those in the battery menu). Fix it by adding a new style-class, popup-inactive-menu-item, that is added to all new PopupMenuItems that are not activatable.
Created attachment 224277 [details] [review] Fix insensitive styling for popup menu items
Review of attachment 224277 [details] [review]: ::: js/ui/popupMenu.js @@ +63,3 @@ + if (!this._activatable && !params.style_class) + params.style_class = 'popup-inactive-menu-item'; It seems a bit silly that inactive-menu-item is only added when there's no explicit style before. It seems like it should be added to the style class.
I added that check to account for popup-subtitle-menu-item, so that I don't need to override popup-inactive-menu-item in that. It's probably ok your way too.
Created attachment 224278 [details] [review] Fix insensitive styling for popup menu items The selector for insensitive popup menu items was wrong (a PopupMenuItem is a ShellGenericContainer, not a StButton). Fixing it showed that previous :insensitive tracking was manual for a reason: we have many items that are not reactive, but don't want the insensitive styling (for example those in the battery menu). Fix it by adding a new style-class, popup-inactive-menu-item, that is added to all new PopupMenuItems that are not activatable.
Review of attachment 224278 [details] [review]: Yes, I like this.
Attachment 224278 [details] pushed as 7499b04 - Fix insensitive styling for popup menu items