[gtk+] treeview: Don't draw a background for the bin window



commit f765bb880305aa1ce068794b9cfbbea64d7925db
Author: Benjamin Otte <otte redhat com>
Date:   Wed Dec 4 10:37:31 2013 +0100

    treeview: Don't draw a background for the bin window
    
    The bin window's background would have to be drawn in the bin window's
    size and inside the pixel cache draw function to not cause transparency
    issues.
    
    But because it's unnecessary as the view window draws the same
    background, we just skip it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709027

 gtk/gtktreeview.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index a914c65..904f5ac 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2222,7 +2222,6 @@ gtk_tree_view_ensure_background (GtkTreeView *tree_view)
 
   context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
 
-  gtk_style_context_set_background (context, tree_view->priv->bin_window);
   gtk_style_context_set_background (context, gtk_widget_get_window (GTK_WIDGET (tree_view)));
   gtk_style_context_set_background (context, tree_view->priv->header_window);
 }
@@ -5465,10 +5464,6 @@ gtk_tree_view_draw (GtkWidget *widget,
   GtkStyleContext *context;
 
   context = gtk_widget_get_style_context (widget);
-  gtk_render_background (context, cr,
-                         0, 0,
-                         gtk_widget_get_allocated_width (widget),
-                         gtk_widget_get_allocated_height (widget));
 
   if (gtk_cairo_should_draw_window (cr, tree_view->priv->bin_window))
     {
@@ -5489,6 +5484,13 @@ gtk_tree_view_draw (GtkWidget *widget,
                             &view_rect, &canvas_rect,
                             draw_bin, widget);
     }
+  else
+    {
+      gtk_render_background (context, cr,
+                             0, 0,
+                             gtk_widget_get_allocated_width (widget),
+                             gtk_widget_get_allocated_height (widget));
+    }
 
   gtk_style_context_save (context);
   gtk_style_context_remove_class (context, GTK_STYLE_CLASS_VIEW);


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