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 721309 - Links inside dimmed labels get different colors depending on window focus
Links inside dimmed labels get different colors depending on window focus
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkLabel
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-01-01 18:05 UTC by Timm Bäder
Modified: 2014-02-06 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case to illustrate the problem (707 bytes, text/x-csrc)
2014-01-01 18:05 UTC, Timm Bäder
  Details
label: Keep link sin synch with state flags (3.79 KB, patch)
2014-01-18 19:39 UTC, Timm Bäder
none Details | Review

Description Timm Bäder 2014-01-01 18:05:28 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)
Comment 1 Timm Bäder 2014-01-02 08:31:33 UTC
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.
Comment 2 Timm Bäder 2014-01-18 19:39:01 UTC
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.
Comment 3 Benjamin Otte (Company) 2014-02-05 12:43:13 UTC
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.