diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-09-20 21:28:25 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-09-22 14:32:05 +0400 |
commit | 1b034ebe04ba36d8738b3445ce5615f1492868eb (patch) | |
tree | de1a842de64bce40be8390c22a33c6fb8e565197 /framework | |
parent | fdo#34392: request button size after vcl has updated its settings (diff) | |
download | core-1b034ebe04ba36d8738b3445ce5615f1492868eb.tar.gz core-1b034ebe04ba36d8738b3445ce5615f1492868eb.zip |
fdo#41440, fdo#50296: start center: force black text color
Change-Id: I13834d3c0385e1a75d2d66d1622a966c66b9aab2
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/backingwindow.cxx | 26 |
1 files 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() |