[gtk+] treeview: Use foreground color to draw dnd marker



commit a0d91a3a71757845e9a256c9306bfa1ac3614d6b
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 15 19:39:12 2016 -0500

    treeview: Use foreground color to draw dnd marker
    
    This is still not perfect, but makes the dnd marker better visible
    in HighContrastInverse.

 gtk/gtktreeview.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index b8378c3..c17bddf 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -5616,13 +5616,15 @@ gtk_tree_view_draw (GtkWidget *widget,
   else if (tree_view->priv->drag_highlight_window &&
            gtk_cairo_should_draw_window (cr, tree_view->priv->drag_highlight_window))
     {
+      GdkRGBA color;
+      gtk_style_context_get_color (context, gtk_style_context_get_state (context), &color);
       cairo_save (cr);
       gtk_cairo_transform_to_window (cr, GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
       if (tree_view->priv->drag_column_window_state == DRAG_COLUMN_WINDOW_STATE_ORIGINAL)
         {
           cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
           cairo_paint (cr);
-          cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+          gdk_cairo_set_source_rgba (cr, &color);
           cairo_rectangle (cr,
                            1, 1,
                            gdk_window_get_width (tree_view->priv->drag_highlight_window) - 2,
@@ -5631,7 +5633,7 @@ gtk_tree_view_draw (GtkWidget *widget,
         }
       else
         {
-          cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+          gdk_cairo_set_source_rgba (cr, &color);
           cairo_paint (cr);
         }
       cairo_restore (cr);


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