From 1b034ebe04ba36d8738b3445ce5615f1492868eb Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Thu, 20 Sep 2012 21:28:25 +0400 Subject: fdo#41440, fdo#50296: start center: force black text color Change-Id: I13834d3c0385e1a75d2d66d1622a966c66b9aab2 --- framework/source/services/backingwindow.cxx | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 008f463b6cc4..34c2585e22f9 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -405,14 +405,22 @@ void BackingWindow::prepareRecentFileMenu() maOpenButton.SetPopupMenu( mpRecentMenu ); } +namespace +{ +static void lcl_SetBlackButtonTextColor( PushButton& rButton ) +{ + AllSettings aSettings = rButton.GetSettings(); + StyleSettings aStyleSettings = aSettings.GetStyleSettings(); + aStyleSettings.SetButtonTextColor( Color(COL_BLACK) ); + aSettings.SetStyleSettings( aStyleSettings ); + rButton.SetSettings( aSettings ); +} +} + void BackingWindow::initBackground() { SetBackground(); - bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode(); - - Color aTextBGColor( bDark ? COL_BLACK : COL_WHITE ); - // select image set ImageContainerRes aRes( FwkResId( RES_BACKING_IMAGES ) ); @@ -456,6 +464,16 @@ void BackingWindow::initBackground() maOpenButton.SetMenuMode( MENUBUTTON_MENUMODE_TIMED ); maOpenButton.SetSelectHdl( LINK( this, BackingWindow, SelectHdl ) ); maOpenButton.SetActivateHdl( LINK( this, BackingWindow, ActivateHdl ) ); + + // fdo#41440: force black text color, since the background image is white. + lcl_SetBlackButtonTextColor( maWriterButton ); + lcl_SetBlackButtonTextColor( maCalcButton ); + lcl_SetBlackButtonTextColor( maImpressButton ); + lcl_SetBlackButtonTextColor( maOpenButton ); + lcl_SetBlackButtonTextColor( maDrawButton ); + lcl_SetBlackButtonTextColor( maDBButton ); + lcl_SetBlackButtonTextColor( maMathButton ); + lcl_SetBlackButtonTextColor( maTemplateButton ); } void BackingWindow::initControls() -- cgit v1.2.3