vcl/unx/gtk3/salnativewidgets-gtk.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
New commits: commit 6d6d8860995576b8e20afb4dfd13c42f5a9bcc10 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue May 31 10:02:58 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue May 31 16:27:05 2022 +0200 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.st...@allotropia.de> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index 0505010bea81..7bc455e62000 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; }