summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-02-08 18:49:41 -0500
committerWolfgang Ulbrich <[email protected]>2016-02-09 08:43:28 +0100
commite5c29655e5301b6d4ba19a3d4970745804039c0e (patch)
treeff0f87a914f41276bbf2903cf94ec5ad0612a4c3
parentf8d6a14a1f551b3e2e9d3b3d76dbc9eace9cdee9 (diff)
downloadcaja-e5c29655e5301b6d4ba19a3d4970745804039c0e.tar.bz2
caja-e5c29655e5301b6d4ba19a3d4970745804039c0e.tar.xz
.view style class on icon view scrolled window
GTK 3.19/3.20 builds only: Applying the .view class to the icon container no longer works in gtk3.19, so apply it to the scrolled window instead. Apply it in both icon view and compact view, as both need it. Doing it from this file prevents it from being applied to the scrolled window under a treeview, thus preventing the exposed corner above the scrollbar in a treeview from showing the view background color. Tested this build in gtk3.19.8 with good results. Tested in my own theme (UbuntuStudio_Legacy),Adwaita, BlackMATE, Green-Submarine, and BlueMenta, all still work right. Adwaita now shows the proper white view color, and my own theme gives a white icon view without also showing white squares over the treeview scrollbars. That was an unwanted side effect of applying the view color in the gtk theme to all the scrolled windows containing list, icon, or compact views as there is no way to tell them apart from the theme only. This approach keeps the scrolled window under the treeview transparent but themes them under icon or compact views. Using .view rather than a custom class enables themes not written for MATE to set the Caja background to match expected view colors, just as it did on the icon container in gtk3.18 and earlier. Leave it on the icon container too, as it may be needed in some themes to theme elements within the icon view. Also, I found no ill effects from the added style class on gtk3.18. In that case, the .view style class on the icon container should cover over anything in the scrolled window. Since the style class is not applied to the scrolled window used by a list view, no ill effect there in gtk 3.19 or gtk3.18. Applying to gtk3.19 only builds for now just in case
-rw-r--r--src/file-manager/fm-icon-view.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
index 19a32cda..72a98221 100644
--- a/src/file-manager/fm-icon-view.c
+++ b/src/file-manager/fm-icon-view.c
@@ -3333,6 +3333,9 @@ fm_icon_view_create (CajaWindowSlotInfo *slot)
"window-slot", slot,
"compact", FALSE,
NULL);
+#if GTK_CHECK_VERSION (3, 19, 0)
+ gtk_style_context_add_class (gtk_widget_get_style_context (view), GTK_STYLE_CLASS_VIEW);
+#endif
return CAJA_VIEW (view);
}
@@ -3345,6 +3348,9 @@ fm_compact_view_create (CajaWindowSlotInfo *slot)
"window-slot", slot,
"compact", TRUE,
NULL);
+#if GTK_CHECK_VERSION (3, 19, 0)
+ gtk_style_context_add_class (gtk_widget_get_style_context (view), GTK_STYLE_CLASS_VIEW);
+#endif
return CAJA_VIEW (view);
}
@@ -3430,4 +3436,3 @@ fm_compact_view_register (void)
TRANSLATE_VIEW_INFO (fm_compact_view)
caja_view_factory_register (&fm_compact_view);
}
-