[libadwaita/wip/exalm/hc] settings: Fix legacy high contrast handling
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/hc] settings: Fix legacy high contrast handling
- Date: Sat, 5 Feb 2022 12:14:14 +0000 (UTC)
commit 8f3cecd5a02391f312b740585adbd35032821150
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]