[gtk+] Cosmetic: Avoid explicit state variables
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Cosmetic: Avoid explicit state variables
- Date: Sat, 14 Nov 2015 17:57:11 +0000 (UTC)
commit debb33db8c5c2271f4f1cea8548ebe13fc6015c0
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 14 10:30:31 2015 -0500
Cosmetic: Avoid explicit state variables
Using the state of the context makes this more obviously correct.
gtk/gtktreeview.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 8545835..a4bd8aa 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]