aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-03-12 10:37:27 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-03-12 10:37:27 +0100
commitfcec11730fc6791b49e0e1b283e8989d6ab5f0ca (patch)
tree012301fc8c03466945169df0229018a43cf091a6
parente6838de2f5db6baa2ef52fe9f92fb3f64580c653 (diff)
parentb7791541706859af97c100bd6072dd0bcb137300 (diff)
downloadayatana-settings-fcec11730fc6791b49e0e1b283e8989d6ab5f0ca.tar.gz
ayatana-settings-fcec11730fc6791b49e0e1b283e8989d6ab5f0ca.tar.bz2
ayatana-settings-fcec11730fc6791b49e0e1b283e8989d6ab5f0ca.zip
Merge branch 'tari01-pr/use-high-contrast-icons'HEADmain
Attributes GH PR #27: https://github.com/AyatanaIndicators/ayatana-settings/pull/27
-rw-r--r--src/gtk.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gtk.h b/src/gtk.h
index fc01b3c..4a0c61d 100644
--- a/src/gtk.h
+++ b/src/gtk.h
@@ -75,18 +75,32 @@ static inline void application_onThemeChanged (GSettings *pSettings, const gchar
if (bHighContrast && bDark)
{
g_object_set (pGtkSettings, "gtk-theme-name", "Default-hc-dark", NULL);
+ gboolean bExists = g_file_test ("/usr/share/icons/HighContrast/index.theme", G_FILE_TEST_EXISTS);
+
+ if (bExists)
+ {
+ g_object_set (pGtkSettings, "gtk-icon-theme-name", "HighContrast", NULL);
+ }
}
else if (bHighContrast)
{
g_object_set (pGtkSettings, "gtk-theme-name", "Default-hc", NULL);
+ gboolean bExists = g_file_test ("/usr/share/icons/HighContrast/index.theme", G_FILE_TEST_EXISTS);
+
+ if (bExists)
+ {
+ g_object_set (pGtkSettings, "gtk-icon-theme-name", "HighContrast", NULL);
+ }
}
else if (bDark)
{
gtk_settings_reset_property (pGtkSettings, "gtk-theme-name");
+ gtk_settings_reset_property (pGtkSettings, "gtk-icon-theme-name");
}
else
{
gtk_settings_reset_property (pGtkSettings, "gtk-theme-name");
+ gtk_settings_reset_property (pGtkSettings, "gtk-icon-theme-name");
}
g_object_set (pGtkSettings, "gtk-application-prefer-dark-theme", bDark, NULL);