diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-09-11 11:10:31 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-09-11 11:10:31 +0000 |
commit | 9d918720a252b81b0f7253d15775e5c173882eba (patch) | |
tree | 6335369ebf47bf468f5d17ce43d8665d77848903 /vcl/source/window/window.cxx | |
parent | 6cdd12a0723ba61b948714cf7617712805c2d8cd (diff) |
CWS-TOOLING: integrate CWS changehc
2009-08-31 19:38:50 +0200 pl r275633 : remove dbug printf
2009-08-31 17:41:50 +0200 pl r275623 : CWS-TOOLING: rebase CWS changehc to trunk@275331 (milestone: DEV300:m56)
2009-07-15 19:45:46 +0200 pl r274028 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:40:52 +0200 pl r274020 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:39:50 +0200 pl r274019 : #i35482# update autohc correctly in MergeSystemSettings
2009-07-15 17:38:57 +0200 pl r274018 : #i35482# update autohc correctly in MergeSystemSettings
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r-- | vcl/source/window/window.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 5333d20d4306..aa06e0154f0b 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -292,6 +292,13 @@ bool Window::ImplCheckUIFont( const Font& rFont ) void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) { + // reset high contrast to false, so the system can either update it + // or AutoDetectSystemHC can kick in (see below) + StyleSettings aTmpSt( rSettings.GetStyleSettings() ); + aTmpSt.SetHighContrastMode( FALSE ); + rSettings.SetStyleSettings( aTmpSt ); + ImplGetFrame()->UpdateSettings( rSettings ); + // Verify availability of the configured UI font, otherwise choose "Andale Sans UI" String aUserInterfaceFont; bool bUseSystemFont = rSettings.GetStyleSettings().GetUseSystemUIFonts(); @@ -472,7 +479,8 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) rSettings.SetStyleSettings( aStyleSettings ); - // #104427# auto detect HC mode ? + // auto detect HC mode; if the system already set it to "yes" + // (see above) then accept that if( !rSettings.GetStyleSettings().GetHighContrastMode() ) { sal_Bool bTmp = sal_False, bAutoHCMode = sal_True; @@ -923,7 +931,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste ! (nStyle & (WB_INTROWIN|WB_DEFAULTWIN)) ) { - mpWindowImpl->mpFrame->UpdateSettings( *pSVData->maAppData.mpSettings ); + // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings ); OutputDevice::SetSettings( *pSVData->maAppData.mpSettings ); pSVData->maAppData.mbSettingsInit = TRUE; |