From 1518fe0a8f0a973f013e21c185f38111d69d6ac7 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 8 Oct 2016 05:07:23 +0200 Subject: API: stylecontext: Remove state argument from getters The argument must always be the current state. --- gtk/gtktextutil.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'gtk/gtktextutil.c') diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c index 1d7d8d21c0..13ea2a552f 100644 --- a/gtk/gtktextutil.c +++ b/gtk/gtktextutil.c @@ -242,7 +242,6 @@ _gtk_text_util_create_drag_icon (GtkWidget *widget, style_context = gtk_widget_get_style_context (widget); gtk_style_context_get_color (style_context, - gtk_style_context_get_state (style_context), &color); gdk_cairo_set_source_rgba (cr, &color); pango_cairo_show_layout (cr, layout); @@ -258,14 +257,11 @@ set_attributes_from_style (GtkStyleContext *context, GtkTextAttributes *values) { GdkRGBA bg_color, fg_color; - GtkStateFlags state; - - 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); @@ -278,7 +274,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); } cairo_surface_t * -- cgit v1.2.1