summaryrefslogtreecommitdiff
path: root/gtk/gtktextutil.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-10-08 05:07:23 +0200
committerBenjamin Otte <otte@redhat.com>2016-10-16 18:18:58 +0200
commit1518fe0a8f0a973f013e21c185f38111d69d6ac7 (patch)
treef3fe2e9fcf10181b91a2d1627a086ca8fd81c485 /gtk/gtktextutil.c
parent7ae008421aaf94d0b6968bcbf71fc3e1271181d8 (diff)
downloadgtk+-1518fe0a8f0a973f013e21c185f38111d69d6ac7.tar.gz
API: stylecontext: Remove state argument from getters
The argument must always be the current state.
Diffstat (limited to 'gtk/gtktextutil.c')
-rw-r--r--gtk/gtktextutil.c10
1 files changed, 3 insertions, 7 deletions
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 *