From 0cda5a72c129bdb835c91a03c08562a11b056868 Mon Sep 17 00:00:00 2001 From: infirit Date: Tue, 9 Dec 2014 23:57:00 +0100 Subject: Gtk3: shell: Port EvWindow to GtkStyleContext Taken from evince commit: 4c3f22a332076fbf6ddc7f2a42bccce9ac673f63 From: Carlos Garcia Campos --- shell/ev-window.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'shell') 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) -- cgit v1.2.1