[nautilus/wip/antoniof/gnome-42-highcontrast: 1/2] application: Apply custom styles in HighConstrast




commit 33e1028e377f3989756e552653df894918f2184c
Author: António Fernandes <antoniof gnome org>
Date:   Wed Mar 16 19:26:27 2022 +0000

    application: Apply custom styles in HighConstrast
    
    HighContrast and HighContrastInverse have been poorly supported in
    this app for a long time because we ship many custom styles.
    
    However, nowadays HighContrast and HighContrastInverse stylesheets
    are derived from Adwaita stylesheet, so the same custom styles
    can be applied cleanly. Let's do that.
    
    Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1614
    and fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1469

 src/nautilus-application.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 3f3cc8999..5abac6ad9 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -1127,7 +1127,10 @@ theme_changed (GtkSettings *settings)
     screen = gdk_screen_get_default ();
 
     /* CSS that themes can override */
-    if (g_str_equal (theme, "Adwaita") || g_str_equal (theme, "Adwaita-dark"))
+    if (g_str_equal (theme, "Adwaita") ||
+        g_str_equal (theme, "Adwaita-dark") ||
+        g_str_equal (theme, "HighContrast") ||
+        g_str_equal (theme, "HighContrastInverse"))
     {
         if (provider == NULL)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]