vcl/unx/gtk3/salnativewidgets-gtk.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
New commits: commit f90239263fcabec30f04098e17dc1be9f9a928d1 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:04:39 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/+/135179 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index df40af50ef6b..3eaffc903e16 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2643,16 +2643,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; }