From debb33db8c5c2271f4f1cea8548ebe13fc6015c0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 14 Nov 2015 10:30:31 -0500 Subject: [PATCH] Cosmetic: Avoid explicit state variables Using the state of the context makes this more obviously correct. --- gtk/gtktreeview.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 8545835398..a4bd8aaadb 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -4854,12 +4854,10 @@ gtk_tree_view_draw_line (GtkTreeView *tree_view, case GTK_TREE_VIEW_FOREGROUND_LINE: { - GtkStateFlags state; GdkRGBA color; - state = gtk_widget_get_state_flags (GTK_WIDGET (tree_view)); cairo_set_line_width (cr, 1.0); - gtk_style_context_get_color (context, state, &color); + gtk_style_context_get_color (context, gtk_style_context_get_state (context), &color); gdk_cairo_set_source_rgba (cr, &color); } break;