[libadwaita/wip/exalm/hc: 3/3] settings: Fix legacy high contrast handling




commit f35d9b38b639857731414c0a3d70904e9926cdfe
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Feb 5 17:14:41 2022 +0500

    settings: Fix legacy high contrast handling
    
    It regressed after c2d77ba76d02bd5351db50e501ff048c4ad691ba

 src/adw-settings.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/adw-settings.c b/src/adw-settings.c
index 11a54bdb..edd51e43 100644
--- a/src/adw-settings.c
+++ b/src/adw-settings.c
@@ -372,6 +372,7 @@ is_theme_high_contrast (GdkDisplay *display)
 {
   GValue value = G_VALUE_INIT;
   const char *theme_name;
+  gboolean ret;
 
   g_value_init (&value, G_TYPE_STRING);
   if (!gdk_display_get_setting (display, "gtk-theme-name", &value))
@@ -379,10 +380,12 @@ is_theme_high_contrast (GdkDisplay *display)
 
   theme_name = g_value_get_string (&value);
 
+  ret = !g_strcmp0 (theme_name, "HighContrast") ||
+        !g_strcmp0 (theme_name, "HighContrastInverse");
+
   g_value_unset (&value);
 
-  return !g_strcmp0 (theme_name, "HighContrast") ||
-         !g_strcmp0 (theme_name, "HighContrastInverse");
+  return ret;
 }
 
 static void


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