diff options
author | Sebastian Keller <sebastian-keller@gmx.de> | 2016-04-29 00:13:59 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-05-02 14:59:33 +0200 |
commit | 1587ee8717f658e3adfdab62f8c73d8576e9ec21 (patch) | |
tree | 8a0620a855263d8c6d04fa276a19fa5f4ed7059f | |
parent | 470235f9349e5244ed5060006b015afb0c47b346 (diff) | |
download | nautilus-1587ee8717f658e3adfdab62f8c73d8576e9ec21.tar.gz |
application: Fix white desktop after changing themes
Changing the theme to Adwaita was causing the Adwaita.css style provider
to get added after the nautilus.css style provider. This caused the
Adwaita.css provider to override the nautilus.css provider, because the
behavior of two style providers with the same priority is undefined and
gtk happens to prefer the style provider that got added last.
https://bugzilla.gnome.org/show_bug.cgi?id=765687
-rw-r--r-- | src/nautilus-application.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c index 2a0d402d3..cf55c747d 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -993,9 +993,13 @@ theme_changed (GtkSettings *settings) 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); + /* The behavior of two style providers with the same priority is + * undefined and gtk happens to prefer the provider that got added last. + * Use a higher priority here to avoid this problem. + */ gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (permanent_provider), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1); g_object_unref (file); } |