From d74c80ebae7d2acd4804ac1d20f6d77b1df53a2a Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Mon, 4 Jan 2016 22:11:54 +0100 Subject: Gtk3 tree-view-drag-dest: port to GtkStyleContext taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=f8bdf9c --- libcaja-private/caja-tree-view-drag-dest.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libcaja-private/caja-tree-view-drag-dest.c') diff --git a/libcaja-private/caja-tree-view-drag-dest.c b/libcaja-private/caja-tree-view-drag-dest.c index 22a5cc51..2d76a1c1 100644 --- a/libcaja-private/caja-tree-view-drag-dest.c +++ b/libcaja-private/caja-tree-view-drag-dest.c @@ -206,18 +206,19 @@ highlight_expose (GtkWidget *widget, width = gdk_window_get_width(bin_window); height = gdk_window_get_height(bin_window); - gtk_paint_focus (gtk_widget_get_style (widget), #if GTK_CHECK_VERSION(3,0,0) - cr, - gtk_widget_get_state (widget), + gtk_render_focus (gtk_widget_get_style_context (widget), + cr, + 0, 0, width, height); #else + gtk_paint_focus (gtk_widget_get_style (widget), bin_window, gtk_widget_get_state (widget), NULL, -#endif widget, "treeview-drop-indicator", 0, 0, width, height); +#endif return FALSE; } -- cgit v1.2.1 From 85faafb667ca2ab548347814595ac9b305c024b8 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Fri, 8 Jan 2016 00:11:42 +0100 Subject: Gtk3 tree-drag-dest: set the right style class taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=18e3369 --- libcaja-private/caja-tree-view-drag-dest.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libcaja-private/caja-tree-view-drag-dest.c') diff --git a/libcaja-private/caja-tree-view-drag-dest.c b/libcaja-private/caja-tree-view-drag-dest.c index 2d76a1c1..accf7bb5 100644 --- a/libcaja-private/caja-tree-view-drag-dest.c +++ b/libcaja-private/caja-tree-view-drag-dest.c @@ -199,6 +199,9 @@ highlight_expose (GtkWidget *widget, GdkWindow *bin_window; int width; int height; +#if GTK_CHECK_VERSION(3,0,0) + GtkStyleContext *style; +#endif /* FIXMEchpe: is bin window right here??? */ bin_window = gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget)); @@ -207,9 +210,16 @@ highlight_expose (GtkWidget *widget, height = gdk_window_get_height(bin_window); #if GTK_CHECK_VERSION(3,0,0) - gtk_render_focus (gtk_widget_get_style_context (widget), + style = gtk_widget_get_style_context (widget); + + gtk_style_context_save (style); + gtk_style_context_add_class (style, "treeview-drop-indicator"); + + gtk_render_focus (style, cr, 0, 0, width, height); + + gtk_style_context_restore (style); #else gtk_paint_focus (gtk_widget_get_style (widget), bin_window, -- cgit v1.2.1