diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-11-02 07:08:53 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-11-02 08:10:42 -0400 |
commit | adc731fad922cb62f982fd753104bfd4365d02aa (patch) | |
tree | 1512bc0b9b022f66982d662f52641e3b94247eda /gtk/gtklinkbutton.c | |
parent | 8ad3fd28b8c1703134ba65a537241bf16ee6dc43 (diff) | |
download | gtk+-adc731fad922cb62f982fd753104bfd4365d02aa.tar.gz |
Remove various internal uses of deprecated api
Diffstat (limited to 'gtk/gtklinkbutton.c')
-rw-r--r-- | gtk/gtklinkbutton.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c index f0724275bb..f17be71473 100644 --- a/gtk/gtklinkbutton.c +++ b/gtk/gtklinkbutton.c @@ -307,6 +307,7 @@ set_link_color (GtkLinkButton *link_button) { GdkColor *link_color = NULL; GtkWidget *label; + GdkRGBA rgba; label = gtk_bin_get_child (GTK_BIN (link_button)); if (!GTK_IS_LABEL (label)) @@ -327,10 +328,14 @@ set_link_color (GtkLinkButton *link_button) link_color = (GdkColor *) &default_link_color; } - gtk_widget_modify_fg (label, GTK_STATE_NORMAL, link_color); - gtk_widget_modify_fg (label, GTK_STATE_ACTIVE, link_color); - gtk_widget_modify_fg (label, GTK_STATE_PRELIGHT, link_color); - gtk_widget_modify_fg (label, GTK_STATE_SELECTED, link_color); + rgba.red = link_color->red / 65535.; + rgba.green = link_color->green / 65535.; + rgba.blue = link_color->blue / 65535.; + rgba.alpha = 1; + gtk_widget_override_color (label, GTK_STATE_FLAG_NORMAL, &rgba); + gtk_widget_override_color (label, GTK_STATE_FLAG_ACTIVE, &rgba); + gtk_widget_override_color (label, GTK_STATE_FLAG_PRELIGHT, &rgba); + gtk_widget_override_color (label, GTK_STATE_FLAG_SELECTED, &rgba); if (link_color != &default_link_color && link_color != &default_visited_link_color) |