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 /src/file-manager/fm-list-view.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 'src/file-manager/fm-list-view.c')
-rw-r--r-- | src/file-manager/fm-list-view.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index dc9bc20b..56ff9b17 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -3262,20 +3262,35 @@ real_set_is_active (FMDirectoryView *view, gboolean is_active) { GtkWidget *tree_view; +#if GTK_CHECK_VERSION (3, 0, 0) + GtkStyleContext *style; + GdkRGBA color; +#else GtkStyle *style; GdkColor color; +#endif tree_view = GTK_WIDGET (fm_list_view_get_tree_view (FM_LIST_VIEW (view))); if (is_active) { +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_override_background_color (tree_view, GTK_STATE_FLAG_NORMAL, NULL); +#else gtk_widget_modify_base (tree_view, GTK_STATE_NORMAL, NULL); +#endif } else { +#if GTK_CHECK_VERSION (3, 0, 0) + style = gtk_widget_get_style_context (tree_view); + gtk_style_context_get_background_color (style, GTK_STATE_FLAG_INSENSITIVE, &color); + gtk_widget_override_background_color (tree_view, GTK_STATE_FLAG_NORMAL, &color); +#else style = gtk_widget_get_style (tree_view); color = style->base[GTK_STATE_INSENSITIVE]; gtk_widget_modify_base (tree_view, GTK_STATE_NORMAL, &color); +#endif } EEL_CALL_PARENT (FM_DIRECTORY_VIEW_CLASS, |