[gtk+/gtk-2-24] Fix drawing of treeview grid lines



commit 1e96603577af5f7ae76d894180091047aaeb977e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 18 19:09:39 2013 -0400

    Fix drawing of treeview grid lines
    
    In the presence of invisible columns, the grid line drawing
    code was malfunctioning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700578

 gtk/gtktreeview.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 85d9ea7..eccd20c 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -4288,7 +4288,7 @@ gtk_tree_view_draw_grid_lines (GtkTreeView    *tree_view,
     return;
 
   /* Only draw the lines for visible rows and columns */
-  for (list = tree_view->priv->columns; list; list = list->next, i++)
+  for (list = tree_view->priv->columns; list; list = list->next)
     {
       GtkTreeViewColumn *column = list->data;
 
@@ -4299,6 +4299,8 @@ gtk_tree_view_draw_grid_lines (GtkTreeView    *tree_view,
       if (! column->visible)
        continue;
 
+      i++;
+
       current_x += column->width;
 
       gtk_tree_view_draw_line (tree_view, event->window,


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