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 728807 - W32: Checkbutton focus rectangle becomes almost white on prelight
W32: Checkbutton focus rectangle becomes almost white on prelight
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Themes
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-04-23 16:38 UTC by LRN
Modified: 2014-04-24 03:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
W32: Fix dummy prelight style for check/radio buttons (1.19 KB, patch)
2014-04-23 16:38 UTC, LRN
committed Details | Review
Before: wrong (almost white) focus box color on prelighted checkbuttons (2.05 KB, image/png)
2014-04-23 16:39 UTC, LRN
  Details
After: keep the correct (black) focus box color on prelighted checkbuttons (2.04 KB, image/png)
2014-04-23 16:40 UTC, LRN
  Details

Description LRN 2014-04-23 16:38:25 UTC
This is a just-discovered consequence of the way i fixed bug 727210.
I came up with an alternative that doesn't seem to have side effects,
unlike setting "color".
Comment 1 LRN 2014-04-23 16:38:31 UTC
Created attachment 274963 [details] [review]
W32: Fix dummy prelight style for check/radio buttons

Use a dummy transparent gradient instead of actual color (which screws up
focus rectangle on prelight), and apply to non-prelight state as well.
Comment 2 LRN 2014-04-23 16:39:32 UTC
Created attachment 274964 [details]
Before: wrong (almost white) focus box color on prelighted checkbuttons
Comment 3 LRN 2014-04-23 16:40:07 UTC
Created attachment 274965 [details]
After: keep the correct (black) focus box color on prelighted checkbuttons
Comment 4 Matthias Clasen 2014-04-24 03:21:48 UTC
Review of attachment 274963 [details] [review]:

hmm. is this the best way to fix it ? anyway, ok if it works
Comment 5 Matthias Clasen 2014-04-24 03:21:48 UTC
Review of attachment 274963 [details] [review]:

hmm. is this the best way to fix it ? anyway, ok if it works
Comment 6 LRN 2014-04-24 03:30:37 UTC
It works.

I still don't quite get how style propagation works, but my guess is that it has something to do with style changing as it goes down the tree. If checkbutton itself has a style that's different from its parent, then its own children's styles are also applied. If its style is the same, children don't get the style.

Or maybe i've got it wrong, and it's not that the style is not applied, but rather that widget is now re-drawn properly on prelight (because its own style does not change on prelight, and it never checks whether the children's styles do).

AFAIU, images produced by gradient objects are unique, so every time you stick a gradient somewhere (even if it's technically the same transparent gradient every time), GTK considers it to be "different" and thus counts two styles with technically the same transparent "gradient" background as different.
Comment 7 LRN 2014-04-24 03:31:18 UTC
s/now redrawn/not redrawn/
Comment 8 LRN 2014-04-24 03:41:20 UTC
Attachment 274963 [details] pushed as 5309149 - W32: Fix dummy prelight style for check/radio buttons