tdf#117006 gtk: detect High Contrast
similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1606038
.e.g. gnome a11y menu, pick "High Contrast"
Change-Id: I60643b3a37b722230d5ed47082e4a6491d005ce4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135160
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx
index 0505010..7bc455e 100644
--- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx
@@ -2638,16 +2638,17 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
aStyleSet.SetToolbarIconSize( ToolbarIconSize::Large );
// finally update the collected settings
rSettings.SetStyleSettings( aStyleSet );
#if OSL_DEBUG_LEVEL > 1
gchar* pThemeName = NULL;
gchar* pThemeName = nullptr;
g_object_get( pSettings, "gtk-theme-name", &pThemeName, nullptr );
SAL_INFO("vcl.gtk3", "Theme name is \""
<< pThemeName
<< "\".");
// High contrast
aStyleSet.SetHighContrastMode(g_strcmp0(pThemeName, "HighContrast") == 0);
g_free(pThemeName);
#endif
// finally update the collected settings
rSettings.SetStyleSettings( aStyleSet );
return true;
}