After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683988 - Fix insensitive styling for popup menu items
Fix insensitive styling for popup menu items
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-09-13 21:13 UTC by Giovanni Campagna
Modified: 2012-09-13 21:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix insensitive styling for popup menu items (3.32 KB, patch)
2012-09-13 21:13 UTC, Giovanni Campagna
reviewed Details | Review
Fix insensitive styling for popup menu items (3.29 KB, patch)
2012-09-13 21:28 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-09-13 21:13:15 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.
Comment 1 Giovanni Campagna 2012-09-13 21:13:18 UTC
Created attachment 224277 [details] [review]
Fix insensitive styling for popup menu items
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-09-13 21:20:04 UTC
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.
Comment 3 Giovanni Campagna 2012-09-13 21:21:49 UTC
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.
Comment 4 Giovanni Campagna 2012-09-13 21:28:20 UTC
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.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-09-13 21:35:03 UTC
Review of attachment 224278 [details] [review]:

Yes, I like this.
Comment 6 Giovanni Campagna 2012-09-13 21:49:54 UTC
Attachment 224278 [details] pushed as 7499b04 - Fix insensitive styling for popup menu items