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 709629 - Use :link and :visited for link colors
Use :link and :visited for link colors
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.10.x
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-10-08 11:27 UTC by Timm Bäder
Modified: 2013-11-04 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds :link and :visited states to the css parser (3.42 KB, patch)
2013-10-08 11:27 UTC, Timm Bäder
committed Details | Review
port GtkLabel to use :link and :visited (6.19 KB, patch)
2013-10-08 11:28 UTC, Timm Bäder
committed Details | Review
Port GtkLinkButton to use :link and :visited (5.96 KB, patch)
2013-10-08 11:28 UTC, Timm Bäder
none Details | Review
Port GtkAboutDialog to use :link and :visited (4.00 KB, patch)
2013-10-08 11:29 UTC, Timm Bäder
committed Details | Review
Port Adwaita to use :link (1.01 KB, patch)
2013-10-08 11:30 UTC, Timm Bäder
none Details | Review
Adwaita: Use :link and :visited instead of the -GtkWidget equivaltents (1.03 KB, patch)
2013-10-15 19:45 UTC, Timm Bäder
committed Details | Review
Port GtkLinkButton to use :link and :visited (5.39 KB, patch)
2013-10-18 08:00 UTC, Timm Bäder
committed Details | Review

Description Timm Bäder 2013-10-08 11:27:11 UTC
Created attachment 256720 [details] [review]
Adds :link and :visited states to the css parser

Links in various widgets are currenly styled via -GtkWidget-link-color and -GtkWidget-visited-link-color.

I have prepared a series of patches that makes it possible to style links via normal css pseudo classes and also ports GtkLabel, GtkLinkButton and GtkAboutDialog to using it.

Grepping for link-color reveals a few part which still need love like the docs in gtklabel.c, the style properties in gtkwidget.c and the gtk-win32-base.css.
Comment 1 Timm Bäder 2013-10-08 11:28:00 UTC
Created attachment 256721 [details] [review]
port GtkLabel to use :link and :visited
Comment 2 Timm Bäder 2013-10-08 11:28:37 UTC
Created attachment 256722 [details] [review]
Port GtkLinkButton to use :link and :visited
Comment 3 Timm Bäder 2013-10-08 11:29:00 UTC
Created attachment 256723 [details] [review]
Port GtkAboutDialog to use :link and :visited
Comment 4 Timm Bäder 2013-10-08 11:30:03 UTC
Created attachment 256724 [details] [review]
Port Adwaita to use :link

This is just the current behavior where all links look the same everywhere and have the same color when visited.
Comment 5 Timm Bäder 2013-10-15 19:45:17 UTC
Created attachment 257384 [details] [review]
Adwaita: Use :link and :visited instead of the -GtkWidget equivaltents

Well, the old patch was obviously missing the :visited style.
Comment 6 Timm Bäder 2013-10-18 08:00:09 UTC
Created attachment 257619 [details] [review]
Port GtkLinkButton to use :link and :visited

This patch sets the visited link color in _set_visited instead of in notify::visited