diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-01-13 15:15:35 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-01-13 15:15:35 +0100 |
commit | 3b7b4cfa969402c5cc9e45369f552729f2b65308 (patch) | |
tree | 610589db57c82fb63f5984d28b3009eb2c0cbb5a /libcaja-private/caja-tree-view-drag-dest.c | |
parent | 3c5a4ef68906a73850fa2ffe403cfcd37dc31ff9 (diff) | |
parent | 1befe8ddf08c12b5c926d269b31d270fb94b9c3e (diff) | |
download | caja-3b7b4cfa969402c5cc9e45369f552729f2b65308.tar.bz2 caja-3b7b4cfa969402c5cc9e45369f552729f2b65308.tar.xz |
Merge pull request #498 from mate-desktop/dev-GtkStyleContext
port to gtk_style_context and other fixes
Diffstat (limited to 'libcaja-private/caja-tree-view-drag-dest.c')
-rw-r--r-- | libcaja-private/caja-tree-view-drag-dest.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libcaja-private/caja-tree-view-drag-dest.c b/libcaja-private/caja-tree-view-drag-dest.c index 22a5cc51..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)); @@ -206,18 +209,26 @@ 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), + 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, gtk_widget_get_state (widget), NULL, -#endif widget, "treeview-drop-indicator", 0, 0, width, height); +#endif return FALSE; } |