diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-10-14 20:17:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-10-15 21:09:34 +0200 |
commit | 75fd3093ea748e35beca1f903e7828ad82f2372f (patch) | |
tree | 77cab254a15b19c7854460cdb7523594c5078d22 /vcl | |
parent | 94e3cce5a9d8136d7c36d1ed596b995aaf47c297 (diff) |
tdf#151522 drop Accessibility::AutoDetectSystemHC
which doesn't preclude having a different option to force it
on/off against the system HighContrast mode setting.
Change-Id: Iab9f7f501ac5fd7bb865d07b30b6fad9f1f6809c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141386
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/settings.cxx | 29 | ||||
-rw-r--r-- | vcl/win/window/salframe.cxx | 5 |
2 files changed, 1 insertions, 33 deletions
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index 11d863c98196..0f36ca84f852 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -221,35 +221,8 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) c rSettings.SetStyleSettings( aStyleSettings ); - bool bForceHCMode = false; - - // auto detect HC mode; if the system already set it to "yes" - // (see above) then accept that - if (!rSettings.GetStyleSettings().GetHighContrastMode() && !utl::ConfigManager::IsFuzzing()) - { - bool bAutoHCMode = true; - utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( - comphelper::getProcessComponentContext(), - "org.openoffice.Office.Common/Accessibility" ); // note: case sensitive ! - if ( aNode.isValid() ) - { - css::uno::Any aValue = aNode.getNodeValue( "AutoDetectSystemHC" ); - bool bTmp = false; - if( aValue >>= bTmp ) - bAutoHCMode = bTmp; - } - if( bAutoHCMode ) - { - if( rSettings.GetStyleSettings().GetFaceColor().IsDark() || - rSettings.GetStyleSettings().GetWindowColor().IsDark() ) - bForceHCMode = true; - } - } - static const char* pEnvHC = getenv( "SAL_FORCE_HC" ); - if( pEnvHC && *pEnvHC ) - bForceHCMode = true; - + const bool bForceHCMode = pEnvHC && *pEnvHC; if( bForceHCMode ) { aStyleSettings = rSettings.GetStyleSettings(); diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 9871eba67edd..1c31c5ad06a5 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2751,11 +2751,6 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) pSVData->maNWFData.mnMenuFormatBorderY = 0; pSVData->maNWFData.maMenuBarHighlightTextColor = COL_TRANSPARENT; GetSalData()->mbThemeMenuSupport = false; - if (officecfg::Office::Common::Accessibility::AutoDetectSystemHC::get()) - { - aStyleSettings.SetShadowColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVEBORDER ) ) ); - aStyleSettings.SetWorkspaceColor( ImplWinColorToSal( GetSysColor( COLOR_MENU ) ) ); - } aStyleSettings.SetMenuColor( ImplWinColorToSal( GetSysColor( COLOR_MENU ) ) ); aStyleSettings.SetMenuBarColor( aStyleSettings.GetMenuColor() ); aStyleSettings.SetMenuBarRolloverColor( aStyleSettings.GetHighlightColor() ); |