GNOME Bugzilla – Bug 728807
W32: Checkbutton focus rectangle becomes almost white on prelight
Last modified: 2014-04-24 03:41: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".
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.
Created attachment 274964 [details] Before: wrong (almost white) focus box color on prelighted checkbuttons
Created attachment 274965 [details] After: keep the correct (black) focus box color on prelighted checkbuttons
Review of attachment 274963 [details] [review]: hmm. is this the best way to fix it ? anyway, ok if it works
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.
s/now redrawn/not redrawn/
Attachment 274963 [details] pushed as 5309149 - W32: Fix dummy prelight style for check/radio buttons