diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2011-01-04 01:12:10 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2011-01-04 02:56:26 +0100 |
commit | 00a80c9bdcc7777591aa2df1d325dedaee387950 (patch) | |
tree | a4224e4a93f14a25df4bba27157b72ab2481a2b8 /gtk/gtkaboutdialog.c | |
parent | 804e8a0572c35477b43f276691e0ee93d09a91c6 (diff) | |
download | gtk+-00a80c9bdcc7777591aa2df1d325dedaee387950.tar.gz |
Update GtkAboutDialog to GtkStyleContext
Diffstat (limited to 'gtk/gtkaboutdialog.c')
-rw-r--r-- | gtk/gtkaboutdialog.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index 6be3edc3e2..4c135d940c 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -1879,7 +1879,6 @@ follow_if_link (GtkAboutDialog *about, GdkColor *style_visited_link_color; GdkColor color; - gtk_widget_ensure_style (GTK_WIDGET (about)); gtk_widget_style_get (GTK_WIDGET (about), "visited-link-color", &style_visited_link_color, NULL); @@ -2074,10 +2073,10 @@ text_view_new (GtkAboutDialog *about, GdkColor visited_link_color; gint size; PangoFontDescription *font_desc; - GtkAboutDialogPrivate *priv = about->priv; + GtkStyleContext *context; + GtkStateFlags state; - gtk_widget_ensure_style (GTK_WIDGET (about)); gtk_widget_style_get (GTK_WIDGET (about), "link-color", &style_link_color, "visited-link-color", &style_visited_link_color, @@ -2105,7 +2104,10 @@ text_view_new (GtkAboutDialog *about, gtk_text_view_set_editable (text_view, FALSE); gtk_text_view_set_wrap_mode (text_view, wrap_mode); - size = pango_font_description_get_size (gtk_widget_get_style (view)->font_desc); + context = gtk_widget_get_style_context (view); + state = gtk_widget_get_state_flags (view); + + size = pango_font_description_get_size (gtk_style_context_get_font (context, state)); font_desc = pango_font_description_new (); pango_font_description_set_size (font_desc, size * PANGO_SCALE_SMALL); gtk_widget_modify_font (view, font_desc); |