st/settings: Switch icon-theme when "high-contrast" is active

This is in line with how GTK handles the setting. Since we are not
using GtkSettings for the icon theme, we have to replicate the
behavior ourselves.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2069>
This commit is contained in:
Florian Müllner 2022-01-05 19:29:08 +01:00 committed by Marge Bot
parent f67418c682
commit c85643d9d5

View File

@ -183,6 +183,9 @@ st_settings_get_property (GObject *object,
g_value_set_boolean (value, settings->high_contrast);
break;
case PROP_GTK_ICON_THEME:
if (settings->high_contrast)
g_value_set_string (value, "HighContrast");
else
g_value_set_string (value, settings->gtk_icon_theme);
break;
case PROP_MAGNIFIER_ACTIVE:
@ -374,6 +377,8 @@ on_a11y_interface_settings_changed (GSettings *g_settings,
{
settings->high_contrast = g_settings_get_boolean (g_settings, key);
g_object_notify_by_pspec (G_OBJECT (settings), props[PROP_HIGH_CONTRAST]);
g_object_notify_by_pspec (G_OBJECT (settings), props[PROP_GTK_ICON_THEME]);
}
}