[gtk+] gtktreeview: Fix horizontal grid lines



commit a1e4ba0dd42684a707c2851b4d45c3637974f6d0
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Jan 27 17:14:26 2015 +0000

    gtktreeview: Fix horizontal grid lines
    
    The clipping was wrong so it was not drawing grid lines
    outside the visible area, which broke due to the pixel cache.

 gtk/gtktreeview.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 3a7355d..7b97c00 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -5293,14 +5293,14 @@ G_GNUC_END_IGNORE_DEPRECATIONS
 
          if (draw_hgrid_lines)
            {
-             if (background_area.y > 0)
+             if (background_area.y >= clip.y)
                 gtk_tree_view_draw_line (tree_view, cr,
                                          GTK_TREE_VIEW_GRID_LINE,
                                          background_area.x, background_area.y,
                                          background_area.x + background_area.width,
                                         background_area.y);
 
-             if (y_offset + max_height >= clip.height)
+             if (background_area.y + max_height < clip.y + clip.height)
                 gtk_tree_view_draw_line (tree_view, cr,
                                          GTK_TREE_VIEW_GRID_LINE,
                                          background_area.x, background_area.y + max_height,


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