diff options
author | Carlos Soriano <csoriano@gnome.org> | 2016-02-15 11:16:10 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-02-15 11:52:00 +0100 |
commit | ec3498d1168cab499131bdfa450bfeb5b43d7946 (patch) | |
tree | 64089cd56d27a315aad86c05c6df0e5529fff3b9 | |
parent | 78f9e7a6413cbb50dab60a64ce2d16031d85eb4c (diff) | |
download | nautilus-ec3498d1168cab499131bdfa450bfeb5b43d7946.tar.gz |
application: give priority to user theme
We want to provide priority to anything that was set on the user theme
rather than in custom Adwaita theme, in case anyone wants to override
some style.
This fixes the desktop window getting the same background as the one
defined for normal windows in the Nautilus Adwaita theme.
https://bugzilla.gnome.org/show_bug.cgi?id=761965
-rw-r--r-- | src/nautilus-application.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c index 560a5caac..ee09857b0 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -1054,17 +1054,6 @@ theme_changed (GtkSettings *settings) g_object_get (settings, "gtk-theme-name", &theme, NULL); screen = gdk_screen_get_default (); - /* CSS we want to always load for any theme */ - if (permanent_provider == NULL) { - permanent_provider = gtk_css_provider_new (); - file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/nautilus.css"); - gtk_css_provider_load_from_file (permanent_provider, file, NULL); - gtk_style_context_add_provider_for_screen (screen, - GTK_STYLE_PROVIDER (permanent_provider), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - g_object_unref (file); - } - /* CSS that themes can override */ if (g_str_equal (theme, "Adwaita")) { @@ -1087,6 +1076,17 @@ theme_changed (GtkSettings *settings) g_clear_object (&provider); } + /* CSS we want to always load for any theme */ + if (permanent_provider == NULL) { + permanent_provider = gtk_css_provider_new (); + file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/nautilus.css"); + gtk_css_provider_load_from_file (permanent_provider, file, NULL); + gtk_style_context_add_provider_for_screen (screen, + GTK_STYLE_PROVIDER (permanent_provider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + g_object_unref (file); + } + g_free (theme); } |