[nautilus] application: Fix white desktop after changing themes
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] application: Fix white desktop after changing themes
- Date: Mon, 2 May 2016 12:59:45 +0000 (UTC)
commit 1587ee8717f658e3adfdab62f8c73d8576e9ec21
Author: Sebastian Keller <sebastian-keller gmx de>
Date: Fri Apr 29 00:13:59 2016 +0200
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
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 2a0d402..cf55c74 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]