summaryrefslogtreecommitdiff
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-09 23:57:00 +0100
committerinfirit <[email protected]>2014-12-10 00:54:06 +0100
commit0cda5a72c129bdb835c91a03c08562a11b056868 (patch)
tree7ede4e0914fbe252cd88ac23901633114b711ff2 /shell/ev-window.c
parent2ec79c385a21ef37d16895c7a622da303a76bf13 (diff)
downloadatril-0cda5a72c129bdb835c91a03c08562a11b056868.tar.bz2
atril-0cda5a72c129bdb835c91a03c08562a11b056868.tar.xz
Gtk3: shell: Port EvWindow to GtkStyleContext
Taken from evince commit: 4c3f22a332076fbf6ddc7f2a42bccce9ac673f63 From: Carlos Garcia Campos <[email protected]>
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index c1933c2c..69d6c986 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -3965,6 +3965,22 @@ fullscreen_toolbar_setup_item_properties (GtkUIManager *ui_manager)
static void
fullscreen_toolbar_remove_shadow (GtkWidget *toolbar)
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkCssProvider *provider;
+
+ gtk_widget_set_name (toolbar, "ev-fullscreen-toolbar");
+
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (provider,
+ "#ev-fullscreen-toolbar {\n"
+ " -GtkToolbar-shadow-type: none; }",
+ -1, NULL);
+ gtk_style_context_add_provider (gtk_widget_get_style_context (toolbar),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+}
+#else
static gboolean done = FALSE;
if (!done) {
@@ -3982,6 +3998,7 @@ fullscreen_toolbar_remove_shadow (GtkWidget *toolbar)
gtk_widget_set_name (toolbar, "fullscreen-toolbar");
}
+#endif
static void
ev_window_run_fullscreen (EvWindow *window)