[gtk+/gtk-3-0] treeview: add the separator style class to the tree view separator lines



commit 6544532e5128d51933903103da8268eed9676eee
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Mar 17 17:08:41 2011 -0400

    treeview: add the separator style class to the tree view separator lines

 gtk/gtktreeview.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index aefe6f6..91ee7a5 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -5122,11 +5122,18 @@ gtk_tree_view_bin_draw (GtkWidget      *widget,
 	  else
 	    {
 	      if (is_separator)
-                gtk_render_line (context, cr,
-				 cell_area.x,
-                                 cell_area.y + cell_area.height / 2,
-				 cell_area.x + cell_area.width,
-				 cell_area.y + cell_area.height / 2);
+                {
+                  gtk_style_context_save (context);
+                  gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
+
+                  gtk_render_line (context, cr,
+                                   cell_area.x,
+                                   cell_area.y + cell_area.height / 2,
+                                   cell_area.x + cell_area.width,
+                                   cell_area.y + cell_area.height / 2);
+
+                  gtk_style_context_restore (context);
+                }
 	      else
 		_gtk_tree_view_column_cell_render (column,
 						   cr,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]