From a0d91a3a71757845e9a256c9306bfa1ac3614d6b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 15 Jan 2016 19:39:12 -0500 Subject: [PATCH] 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 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index b8378c3e9a..c17bddfe8d 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);