[gtk+] treeview: set "dnd" style class when drawing drag and drop indicators



commit a3b097639f47d9ccb914418d7e564060897f7160
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Feb 13 22:19:53 2012 -0500

    treeview: set "dnd" style class when drawing drag and drop indicators
    
    This is useful to theme the rings that appear around rows on drag and
    drop.

 gtk/gtktreeview.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 251717f..c8d0895 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -5176,6 +5176,9 @@ gtk_tree_view_bin_draw (GtkWidget      *widget,
 	  GtkRBTree *tree = NULL;
 	  GtkRBNode *node = NULL;
 
+          gtk_style_context_save (context);
+          gtk_style_context_add_class (context, GTK_STYLE_CLASS_DND);
+
           switch (tree_view->priv->drag_dest_pos)
             {
             case GTK_TREE_VIEW_DROP_BEFORE:
@@ -5213,6 +5216,8 @@ gtk_tree_view_bin_draw (GtkWidget      *widget,
                                        rtl ? 0 : bin_window_width,
                                        highlight_y);
             }
+
+          gtk_style_context_restore (context);
         }
 
       /* draw the big row-spanning focus rectangle, if needed */



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