GNOME Bugzilla – Bug 721309
Links inside dimmed labels get different colors depending on window focus
Last modified: 2014-02-06 18:45:58 UTC
Created attachment 265108 [details] Test case to illustrate the problem Since links inside labels are now styled via :link and :visited, unstyled links simply get the color of the label they're in, i.e. links in .dim-label labels are black(or theme-fg-color iirc, because they can't be semi-transparent). Now try the attached test case: 1) start it and wait a second so at least one label appears, it's black. 2) unfocus the window(i.e. focus another one) 3) The labels which appear while the window is unfocused have the dim-label's color, i.e. a slightly transparent black(which is probably the correct behavior)
On second thought, I'm pretty sure that the links just get the backdrop color instead of the .dim-label color(i.e. it also happens with out the dim-label style class applied) and then the links don't update their color once the window is focused again while the rest of the text does.
Created attachment 266627 [details] [review] label: Keep link sin synch with state flags Just update the link colors on every state flag change. I couldn't find obvious bugs when running a few applications and the test case from earlier but I'm not sure if the solution is perfect either. The commit message is rather poor and I'd like to improve it for the final version if there is one; just wanted to keep it short for the first try.
Should be fixed in git master. At least your testcase works. I had to change your patch a bit, the correct place to do the recoloring is style_updated, not state_flags_changed. Otherwise: nice find.