diff options
author | Benjamin Otte <otte@redhat.com> | 2016-10-08 05:07:23 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-10-16 18:18:58 +0200 |
commit | 1518fe0a8f0a973f013e21c185f38111d69d6ac7 (patch) | |
tree | f3fe2e9fcf10181b91a2d1627a086ca8fd81c485 /gtk/gtktextview.c | |
parent | 7ae008421aaf94d0b6968bcbf71fc3e1271181d8 (diff) | |
download | gtk+-1518fe0a8f0a973f013e21c185f38111d69d6ac7.tar.gz |
API: stylecontext: Remove state argument from getters
The argument must always be the current state.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r-- | gtk/gtktextview.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 191deaa313..84b6599d4f 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4812,8 +4812,8 @@ text_window_set_padding (GtkTextView *text_view, priv = text_view->priv; - gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding); - gtk_style_context_get_border (context, gtk_style_context_get_state (context), &border); + gtk_style_context_get_padding (context, &padding); + gtk_style_context_get_border (context, &border); padding.left += border.left; padding.right += border.right; padding.top += border.top; @@ -7881,15 +7881,13 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view, { GtkStyleContext *context; GdkRGBA bg_color, fg_color; - GtkStateFlags state; context = gtk_widget_get_style_context (GTK_WIDGET (text_view)); - state = gtk_style_context_get_state (context); G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_style_context_get_background_color (context, state, &bg_color); + gtk_style_context_get_background_color (context, &bg_color); G_GNUC_END_IGNORE_DEPRECATIONS - gtk_style_context_get_color (context, state, &fg_color); + gtk_style_context_get_color (context, &fg_color); values->appearance.bg_color.red = CLAMP (bg_color.red * 65535. + 0.5, 0, 65535); values->appearance.bg_color.green = CLAMP (bg_color.green * 65535. + 0.5, 0, 65535); @@ -7902,7 +7900,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS if (values->font) pango_font_description_free (values->font); - gtk_style_context_get (context, state, "font", &values->font, NULL); + gtk_style_context_get (context, "font", &values->font, NULL); } static void |