Anonymous avatar Anonymous committed 84306ab

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

Comments (0)

Files changed (26)

framework/source/classes/bmkmenu.cxx

 	::rtl::OUString aTargetFrame;
 	::rtl::OUString aImageId;
 
-	BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+	BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
 
 	UINT32 i, nCount = aDynamicMenuEntries.getLength();
 	for ( i = 0; i < nCount; ++i )

framework/source/classes/menumanager.cxx

 	SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
 
 	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
-	m_bWasHiContrast	= rSettings.GetMenuColor().IsDark();
+	m_bWasHiContrast	= rSettings.GetHighContrastMode();
 	m_bShowMenuImages	= rSettings.GetUseImagesInMenus();
 
 	sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength();
 	m_bIsBookmarkMenu	= sal_True;
 
 	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
-	m_bWasHiContrast	= rSettings.GetMenuColor().IsDark();
+	m_bWasHiContrast	= rSettings.GetHighContrastMode();
 
 	SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
 
                   UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
 
 		// Check if some modes have changed so we have to update our menu images
-		sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
+		sal_Bool bIsHiContrast = rSettings.GetHighContrastMode();
 
 		if ( m_bWasHiContrast != bIsHiContrast || bShowMenuImages != m_bShowMenuImages )
 		{

framework/source/helper/actiontriggerhelper.cxx

 	{
         AddonsOptions aAddonOptions;
 	    const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
-	    sal_Bool bHiContrast = rSettings.GetMenuColor().IsDark();
+	    sal_Bool bHiContrast = rSettings.GetHighContrastMode();
         
         OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
 

framework/source/services/backingwindow.cxx

     if ( rDCEvt.GetFlags() & SETTINGS_STYLE )
     {
         initBackground();
+        Invalidate();
     }
 }
 
 {
     SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
     
-    bool bDark = GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+    bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
     maWelcomeTextColor = maLabelTextColor =  bDark ? Color( COL_WHITE ) : Color( 0x26, 0x35, 0x42 );
     Color aTextBGColor( bDark ? COL_BLACK : COL_WHITE );
 
 
 void BackingWindow::Paint( const Rectangle& )
 {
-    bool bDark = GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+    bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
     
     Color aBackColor( bDark ? COL_BLACK : COL_WHITE );
 

framework/source/uielement/controlmenucontroller.cxx

     m_pResPopupMenu( 0 )
 {
     const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
-	m_bWasHiContrast    = rSettings.GetMenuColor().IsDark();
+	m_bWasHiContrast    = rSettings.GetHighContrastMode();
     m_bShowMenuImages   = rSettings.GetUseImagesInMenus();
 
 }
 	    
 		// Check if some modes have changed so we have to update our menu images
 		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
-		sal_Bool bIsHiContrast      = rSettings.GetMenuColor().IsDark();
+		sal_Bool bIsHiContrast      = rSettings.GetHighContrastMode();
         sal_Bool bShowMenuImages    = rSettings.GetUseImagesInMenus();
         sal_Bool bUpdateImages      = (( m_bWasHiContrast != bIsHiContrast ) || ( bShowMenuImages != m_bShowMenuImages ));
 

framework/source/uielement/imagebuttontoolbarcontroller.cxx

     ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand )
 {
     sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
-    sal_Bool bHiContrast( pToolbar->GetDisplayBackground().GetColor().IsDark() );
+    sal_Bool bHiContrast( pToolbar->GetSettings().GetStyleSettings().GetHighContrastMode() );
 
     Image aImage = AddonsOptions().GetImageFromURL( aCommand, bBigImages, bHiContrast, sal_True );
 

framework/source/uielement/menubarmanager.cxx

              MenuManager::UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
 
 		// Check if some modes have changed so we have to update our menu images
-		sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
+		sal_Bool bIsHiContrast = rSettings.GetHighContrastMode();
 		sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle();
 
 		if ( m_bRetrieveImages ||
     m_xDispatchProvider = rDispatchProvider;
 
 	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
-	m_bWasHiContrast	= rSettings.GetMenuColor().IsDark();
+	m_bWasHiContrast	= rSettings.GetHighContrastMode();
 	m_bShowMenuImages	= rSettings.GetUseImagesInMenus();
     m_bRetrieveImages   = sal_False;
 
 		UNO_QUERY );
 
 	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
-	m_bWasHiContrast	= rSettings.GetMenuColor().IsDark();
+	m_bWasHiContrast	= rSettings.GetHighContrastMode();
 
     Reference< XStatusListener > xStatusListener;
     Reference< XDispatch > xDispatch;

framework/source/uielement/newmenucontroller.cxx

         {
             const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
             sal_Bool bShowImages( rSettings.GetUseImagesInMenus() );
-            sal_Bool bHiContrast( rSettings.GetMenuColor().IsDark() );
+            sal_Bool bHiContrast( rSettings.GetHighContrastMode() );
 
             PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
             
             const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
 
             m_bShowImages   = rSettings.GetUseImagesInMenus();
-	        m_bHiContrast   = rSettings.GetMenuColor().IsDark();
+            m_bHiContrast   = rSettings.GetHighContrastMode();
 
             m_bNewMenu      = m_aCommandURL.equalsAscii( ".uno:AddDirect" );
         }

framework/source/uielement/toolbarmanager.cxx

     ThreadHelpBase( &Application::GetSolarMutex() ),
     OWeakObject(),
     m_bDisposed( sal_False ),
-    m_bIsHiContrast( pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark() ),
+    m_bIsHiContrast( pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode() ),
     m_bSmallSymbols( !SvtMiscOptions().AreCurrentSymbolsLarge() ),
     m_bModuleIdentified( sal_False ),
     m_bAddedToTaskPaneList( sal_True ),
     sal_Bool bRefreshImages = sal_False;
 
     // Check if high contrast/normal mode have changed
-	if ( m_pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+	if ( m_pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode() )
 	{
 		if ( !m_bIsHiContrast )
 		{
     }
 
 	sal_Bool  bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
-    m_bIsHiContrast = m_pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+    m_bIsHiContrast = m_pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode();
     sal_Int16 p = getImageTypeFromBools( SvtMiscOptions().AreCurrentSymbolsLarge(), m_bIsHiContrast );
 
     if ( m_xDocImageManager.is() )

framework/source/uielement/toolbarsmenucontroller.cxx

 	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
     
     if ( rSettings.GetUseImagesInMenus() )
-        aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetMenuColor().IsDark() );
+        aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetHighContrastMode() );
 
     VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu );
     if ( pPopupMenu )

svx/source/cui/optaccessibility.cxx

 	if(m_pImpl->m_aConfig.IsModified())
 		m_pImpl->m_aConfig.Commit();
 
-#ifndef UNX
     AllSettings aAllSettings = Application::GetSettings();
     MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
+#ifndef UNX
     aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() );
+#endif
     aAllSettings.SetMiscSettings(aMiscSettings);
     Application::SetSettings(aAllSettings);
     Application::MergeSystemSettings( aAllSettings );
-#endif
 
 	return FALSE;
 }

vcl/source/app/svapp.cxx

         ImplSVData* pSVData = ImplGetSVData();
         if ( !pSVData->maAppData.mbSettingsInit )
         {
-            pWindow->ImplGetFrame()->UpdateSettings( *pSVData->maAppData.mpSettings );
+            // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings
             pWindow->ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings );
             pSVData->maAppData.mbSettingsInit = TRUE;
         }
-        pWindow->ImplGetFrame()->UpdateSettings( rSettings );
+        // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings
         pWindow->ImplUpdateGlobalSettings( rSettings, FALSE );
     }
 }

vcl/source/control/button.cxx

     Image    *pImage    = &(mpButtonData->maImage);
     BitmapEx *pBitmapEx = mpButtonData->mpBitmapEx;
 
-    Color aBackCol;
-    if( !!(mpButtonData->maImageHC) && ImplGetCurrentBackgroundColor( aBackCol ) )
+    if( !!(mpButtonData->maImageHC) )
     {
-        if( aBackCol.IsDark() )
+        if( GetSettings().GetStyleSettings().GetHighContrastMode() )
         {
             pImage = &(mpButtonData->maImageHC);
             pBitmapEx = mpButtonData->mpBitmapExHC;
 
 		// check for HC mode
 		Image *pImage = &maImage;
-		Color aBackCol;
-		if( !!maImageHC && ImplGetCurrentBackgroundColor( aBackCol ) )
+		if( !!maImageHC )
 		{
-			if( aBackCol.IsDark() )
+			if( rStyleSettings.GetHighContrastMode() )
 				pImage = &maImageHC;
-            // #99902 no col transform required
-			//if( aBackCol.IsBright() )
-			//	nStyle |= IMAGE_DRAW_COLORTRANSFORM;
 		}
 
         Point aImagePos( aImageRect.TopLeft() );

vcl/source/control/fixed.cxx

 	USHORT nStyle = 0;
 	Bitmap* pBitmap = &maBitmap;
 	Color aCol;
-	if( !!maBitmapHC && ImplGetCurrentBackgroundColor( aCol ) )
+	if( !!maBitmapHC )
 	{
-		if( aCol.IsDark() )
+		if( GetSettings().GetStyleSettings().GetHighContrastMode() )
 			pBitmap = &maBitmapHC;
-        // #99902 no col transform required
-		//if( aCol.IsBright() )
-		//	nStyle |= IMAGE_DRAW_COLORTRANSFORM;
 	}
 
 	if( nStyle & IMAGE_DRAW_COLORTRANSFORM )
 
 	Image *pImage = &maImage;
 	Color aCol;
-	if( !!maImageHC && ImplGetCurrentBackgroundColor( aCol ) )
+	if( !!maImageHC )
 	{
-		if( aCol.IsDark() )
+		if( GetSettings().GetStyleSettings().GetHighContrastMode() )
 			pImage = &maImageHC;
-        // #99902 no col transform required
-		//if( aCol.IsBright() )
-		//	nStyle |= IMAGE_DRAW_COLORTRANSFORM;
 	}
 
 	// Haben wir ueberhaupt ein Image

vcl/source/control/ilstbox.cxx

 
 		if( !!maImageHC )
 		{
-			// determine backgroundcolor as done in Paint()
-			Color aBackCol;
-			if( IsEnabled() )
-			{
-				if( HasFocus() )
-					aBackCol = GetSettings().GetStyleSettings().GetHighlightColor();
-				else
-					aBackCol = GetBackground().GetColor();
-			}
-			else // Disabled
-				aBackCol = GetBackground().GetColor();
-
-			if( aBackCol.IsDark() )
+			if( GetSettings().GetStyleSettings().GetHighContrastMode() )
 				pImage = &maImageHC;
-            // #99902 no col transform required
-			//if( aBackCol.IsBright() )
-			//	nStyle |= IMAGE_DRAW_COLORTRANSFORM;
 		}
 
 		if ( !IsZoom() )

vcl/source/control/imgctrl.cxx

 {
 	USHORT nStyle = 0;
 	BitmapEx* pBitmap = &maBmp;
-	Color aCol;
-	if( !!maBmpHC && ImplGetCurrentBackgroundColor( aCol ) )
+	if( !!maBmpHC )
 	{
-		if( aCol.IsDark() )
+		if( GetSettings().GetStyleSettings().GetHighContrastMode() )
 			pBitmap = &maBmpHC;
-        // #99902 no col transform required
-        //if( aCol.IsBright() )
-		//	nStyle |= IMAGE_DRAW_COLORTRANSFORM;
 	}
 
     if ( !*pBitmap )

vcl/source/gdi/outdev3.cxx

     {
         BOOL  bHighContrastBlack = FALSE;
         BOOL  bHighContrastWhite = FALSE;
-		Color aCol;
-		if( IsBackground() )
-			aCol = GetBackground().GetColor();
-		else
-			// best guess is the face color here
-			// but it may be totally wrong. the background color
-			// was typically already reset
-			aCol = GetSettings().GetStyleSettings().GetFaceColor();
-
-		bHighContrastBlack = aCol.IsDark();
-		bHighContrastWhite = aCol.IsBright() && GetSettings().GetStyleSettings().GetHighContrastMode();
-
+        const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() );
+        if( rStyleSettings.GetHighContrastMode() )
+        {
+            Color aCol;
+            if( IsBackground() )
+                aCol = GetBackground().GetColor();
+            else
+                // best guess is the face color here
+                // but it may be totally wrong. the background color
+                // was typically already reset
+                aCol = rStyleSettings.GetFaceColor();
+    
+            bHighContrastBlack = aCol.IsDark();
+            bHighContrastWhite = aCol.IsBright();
+        }
+    
         aOldTextColor = GetTextColor();
         if ( IsTextFillColor() )
         {
             bRestoreFillColor = TRUE;
             aOldTextFillColor = GetTextFillColor();
         }
-        else
-            bRestoreFillColor = FALSE;
         if( bHighContrastBlack )
             SetTextColor( COL_GREEN );
         else if( bHighContrastWhite )
             aRect.Move( 1, 1 );
             DrawText( aRect, rOrigStr, nStyle & ~TEXT_DRAW_DISABLE );
             */
-            SetTextColor( GetSettings().GetStyleSettings().GetShadowColor() );
+            SetTextColor( GetSettings().GetStyleSettings().GetDisableColor() );
         }
     }
 
         BOOL  bRestoreFillColor;
         BOOL  bHighContrastBlack = FALSE;
         BOOL  bHighContrastWhite = FALSE;
-		if( IsBackground() )
-		{
-			Wallpaper aWall = GetBackground();
-			Color aCol = aWall.GetColor();
-			bHighContrastBlack = aCol.IsDark();
-			bHighContrastWhite = aCol.IsBright() && GetSettings().GetStyleSettings().GetHighContrastMode();
-		}
+        const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() );
+        if( rStyleSettings.GetHighContrastMode() )
+        {
+            if( IsBackground() )
+            {
+                Wallpaper aWall = GetBackground();
+                Color aCol = aWall.GetColor();
+                bHighContrastBlack = aCol.IsDark();
+                bHighContrastWhite = aCol.IsBright();
+            }
+        }
+        
         aOldTextColor = GetTextColor();
         if ( IsTextFillColor() )
         {
         else if( bHighContrastWhite )
             SetTextColor( COL_LIGHTGREEN );
         else
-            SetTextColor( GetSettings().GetStyleSettings().GetShadowColor() );
+            SetTextColor( GetSettings().GetStyleSettings().GetDisableColor() );
 
         DrawText( rPos, aStr, nIndex, nLen, pVector, pDisplayText );
         if ( !(GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_NOMNEMONICS) && !pVector )

vcl/source/gdi/wall.cxx

     g.SetStyle( GRADIENT_LINEAR );
     g.SetStartColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
     // no 'extreme' gradient when high contrast
-	if( Application::GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+	if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
 		g.SetEndColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
 	else
 		g.SetEndColor( Application::GetSettings().GetStyleSettings().GetFaceGradientColor() );

vcl/source/window/menu.cxx

 
     void    DataChanged( const DataChangedEvent& rDCEvt );
 
-    void    SetImages( long nMaxHeight = 0 );
+    void    SetImages( long nMaxHeight = 0, bool bForce = false );
 
     void    calcMinSize();
     Size    getMinSize();
     {
         calcMinSize();
         SetBackground();
-        SetImages();
+        SetImages( 0, true);
     }
 }
 
     return maMinSize;
 }
 
-void DecoToolBox::SetImages( long nMaxHeight )
+void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
 {
     long border = getMinSize().Height() - maImage.GetSizePixel().Height();
 
     if( nMaxHeight < getMinSize().Height() )
         nMaxHeight = getMinSize().Height();
 
-    if( lastSize != nMaxHeight - border )
+    if( (lastSize != nMaxHeight - border) || bForce )
     {
         lastSize = nMaxHeight - border;
 
 		Color		aEraseColor( 255, 255, 255, 255 );
         BitmapEx 	aBmpExDst( maImage.GetBitmapEx() );
-        BitmapEx 	aBmpExSrc( GetSettings().GetStyleSettings().GetMenuBarColor().IsDark() ?
+        BitmapEx 	aBmpExSrc( GetSettings().GetStyleSettings().GetHighContrastMode() ?
             			  	maImageHC.GetBitmapEx() : aBmpExDst );
     	
 		aEraseColor.SetTransparency( 255 );
         aCloser.SetParentClipMode( PARENTCLIPMODE_NOCLIP );
         
         aCloser.InsertItem( IID_DOCUMENTCLOSE,
-        GetSettings().GetStyleSettings().GetMenuBarColor().IsDark() ? aCloser.maImageHC : aCloser.maImage, 0 );
+        GetSettings().GetStyleSettings().GetHighContrastMode() ? aCloser.maImageHC : aCloser.maImage, 0 );
         aCloser.SetSelectHdl( LINK( this, MenuBarWindow, CloserHdl ) );
         aCloser.AddEventListener( LINK( this, MenuBarWindow, ToolboxEventHdl ) );
         aCloser.SetQuickHelpText( IID_DOCUMENTCLOSE, XubString( ResId( SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr ) ) );
 
 	// in high contrast mode draw a separating line on the lower edge
 	if( ! IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) &&
-		GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+		GetSettings().GetStyleSettings().GetHighContrastMode() )
     {
 		Push( PUSH_LINECOLOR | PUSH_MAPMODE );
 		SetLineColor( Color( COL_WHITE ) );

vcl/source/window/msgbox.cxx

 	if ( !GetText().Len() )
 		SetText( Application::GetDisplayName() );
 
-	SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
+	SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
                 InfoBox::GetStandardImageHC() : InfoBox::GetStandardImage() );
 	mnSoundType = ((USHORT)SOUND_INFO)+1;
 }
 	if ( !GetText().Len() )
 		SetText( Application::GetDisplayName() );
 
-	SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ? 
+	SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? 
         ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() );
 	mnSoundType = ((USHORT)SOUND_ERROR)+1;
 }
 	if ( !GetText().Len() )
 		SetText( Application::GetDisplayName() );
 
-	SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
+	SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
         QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
 	mnSoundType = ((USHORT)SOUND_QUERY)+1;
 }

vcl/source/window/toolbox.cxx

     Color startCol, endCol;
     startCol = pThis->GetSettings().GetStyleSettings().GetFaceGradientColor();
     endCol = pThis->GetSettings().GetStyleSettings().GetFaceColor();
-    if( endCol.IsDark() )
+    if( pThis->GetSettings().GetStyleSettings().GetHighContrastMode() )
         // no 'extreme' gradient when high contrast
         startCol = endCol;
 

vcl/source/window/toolbox2.cxx

 {
     if (mpData->mpImageListProvider != NULL)
     {
-        BOOL bIsDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+        BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
         try
         {
-            ImageListType eType = bIsDark ? vcl::HIGHCONTRAST_YES : vcl::HIGHCONTRAST_NO;
+            ImageListType eType = bHC ? vcl::HIGHCONTRAST_YES : vcl::HIGHCONTRAST_NO;
 
             if (eType != mpData->meImageListType)
             {

vcl/source/window/window.cxx

 
 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();
     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;
              ! (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;

vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx

     //  FIXME: need some way of fetching toolbar icon size.
 //	aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL );
 
-    /* #i35482# do not override HC mode per force
-    // #i59364# high contrast mode
-    bool bHC = ( aStyleSet.GetFaceColor().IsDark() ||
-                 aStyleSet.GetWindowColor().IsDark() );
-    aStyleSet.SetHighContrastMode( bHC );
-    */
-
     // finally update the collected settings
     rSettings.SetStyleSettings( aStyleSet );
 

vcl/unx/gtk/window/gtkframe.cxx

     USHORT nIndex;
 
     // Use high contrast icons where appropriate
-    if( Application::GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+    if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
     {
         nOffsets[0] = SV_ICON_LARGE_HC_START;
         nOffsets[1] = SV_ICON_SMALL_HC_START;

vcl/unx/kde/salnativewidgets-kde.cxx

     // Scroll bar size
     aStyleSettings.SetScrollBarSize( kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent ) );
     
-    /* #i35482# do not override HC mode
-    // #i59364# high contrast mode
-    bool bHC = ( aStyleSettings.GetFaceColor().IsDark() ||
-                 aStyleSettings.GetWindowColor().IsDark() );
-    aStyleSettings.SetHighContrastMode( bHC );
-    */
-
     rSettings.SetStyleSettings( aStyleSettings );
 }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.