summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-01-03 15:07:09 +0000
committerKurt Zenker <kz@openoffice.org>2006-01-03 15:07:09 +0000
commit498bdeaa2dbf7d2b50ff4c1c329edf5014fa1c12 (patch)
treee6502f6685ca9db8836ae8f11c3bcf6445798d40 /svtools
parentd563b19cf68d5bb2e3eee2e64c07b3e86566446c (diff)
INTEGRATION: CWS dba202c (1.24.102); FILE MERGED
2005/12/06 10:13:12 oj 1.24.102.2: #i52615# set correct colors on outdev 2005/12/01 14:20:22 oj 1.24.102.1: #i52615# set correct colors on outdev
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/imivctl1.cxx26
1 files changed, 15 insertions, 11 deletions
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index f2becdaabae9..23e0d3b57963 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: imivctl1.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 14:52:28 $
+ * last change: $Author: kz $ $Date: 2006-01-03 16:07:09 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1894,12 +1894,13 @@ void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
}
else
{
+ Color aOldFontColor = pOut->GetTextColor();
if ( pView->AutoFontColor() )
{
Color aBkgColor( pOut->GetBackground().GetColor() );
Color aFontColor;
USHORT nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
- if ( nColor > 128 )
+ if ( nColor > 127 )
aFontColor.SetColor ( COL_BLACK );
else
aFontColor.SetColor( COL_WHITE );
@@ -1908,6 +1909,9 @@ void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
pOut->DrawText( rRect, aText, nCurTextDrawFlags );
+ if ( pView->AutoFontColor() )
+ pOut->SetTextColor( aOldFontColor );
+
if( pEntry->IsFocused() )
{
Rectangle aRect ( CalcFocusRect( (SvxIconChoiceCtrlEntry*)pEntry ) );
@@ -4124,21 +4128,21 @@ void SvxIconChoiceCtrl_Impl::InitSettings()
// Unit aus den Settings ist Point
Font aFont( rStyleSettings.GetFieldFont() );
const Font& rFont = pView->GetFont();
- if( pView->HasFontTextColor() )
+ //if( pView->HasFontTextColor() )
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- if( pView->HasFontFillColor() )
- aFont.SetFillColor( rFont.GetFillColor() );
+ //if( pView->HasFontFillColor() )
+ //aFont.SetFillColor( rFont.GetFillColor() );
pView->SetPointFont( aFont );
SetDefaultTextSize();
}
- if( !pView->HasFontTextColor() )
- pView->SetTextColor( rStyleSettings.GetWindowTextColor() );
- if( !pView->HasFontFillColor() )
+ //if( !pView->HasFontTextColor() )
+ pView->SetTextColor( rStyleSettings.GetFieldTextColor() );
+ //if( !pView->HasFontFillColor() )
pView->SetTextFillColor();
- if( !pView->HasBackground() )
- pView->SetBackground( rStyleSettings.GetWindowColor());
+ //if( !pView->HasBackground() )
+ pView->SetBackground( rStyleSettings.GetFieldColor());
long nScrBarSize = rStyleSettings.GetScrollBarSize();
if( nScrBarSize != nHorSBarHeight || nScrBarSize != nVerSBarWidth )