summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs2
-rw-r--r--vcl/source/window/window.cxx17
2 files changed, 10 insertions, 9 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index cc6da7d4f867..64661b5cd923 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -6138,7 +6138,7 @@
implicitly, which is recognized if the option is set.</desc>
<label>detect system's high contrast</label>
</info>
- <value>true</value>
+ <value>false</value>
</prop>
<prop oor:name="IsForPagePreviews" oor:type="xs:boolean" oor:nillable="false">
<info>
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index aa3db23122f9..5a7d571f463c 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -625,6 +625,8 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
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() )
@@ -641,20 +643,19 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
}
if( bAutoHCMode )
{
- if( rSettings.GetStyleSettings().GetFaceColor().IsDark()
- || rSettings.GetStyleSettings().GetWindowColor().IsDark() )
- {
- aStyleSettings = rSettings.GetStyleSettings();
- aStyleSettings.SetHighContrastMode( sal_True );
- aStyleSettings.SetSymbolsStyle( STYLE_SYMBOLS_HICONTRAST );
- rSettings.SetStyleSettings( aStyleSettings );
- }
+ if( rSettings.GetStyleSettings().GetFaceColor().IsDark() ||
+ rSettings.GetStyleSettings().GetWindowColor().IsDark() )
+ bForceHCMode = true;
}
}
static const char* pEnvHC = getenv( "SAL_FORCE_HC" );
if( pEnvHC && *pEnvHC )
+ bForceHCMode = true;
+
+ if( bForceHCMode )
{
+ aStyleSettings = rSettings.GetStyleSettings();
aStyleSettings.SetHighContrastMode( sal_True );
aStyleSettings.SetSymbolsStyle( STYLE_SYMBOLS_HICONTRAST );
rSettings.SetStyleSettings( aStyleSettings );