From 883991e8470075be1ade56595a90040d1ad64f6c Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Tue, 13 Sep 2011 14:42:17 +0200 Subject: Header/Footer: use a plus symbol instead of the add icon This will help drawing the high contrast mode and makes the plus more visible even given the background color. --- sw/source/ui/docvw/HeaderFooterWin.cxx | 47 +++++++++++++--------------------- 1 file changed, 18 insertions(+), 29 deletions(-) (limited to 'sw/source/ui/docvw/HeaderFooterWin.cxx') diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 6f59189afa77..edc09d880ffa 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -214,36 +214,25 @@ void SwHeaderFooterWin::Paint( const Rectangle& ) Size aPicSize( BUTTON_WIDTH, aRect.getHeight() ); Rectangle aSymbolRect( aPicPos, aPicSize ); + // 25% distance to the left and right button border + const long nBorderDistanceLeftAndRight = ((aSymbolRect.GetWidth()*250)+500)/1000; + aSymbolRect.Left()+=nBorderDistanceLeftAndRight; + aSymbolRect.Right()-=nBorderDistanceLeftAndRight; + // 30% distance to the top button border + const long nBorderDistanceTop = ((aSymbolRect.GetHeight()*300)+500)/1000; + aSymbolRect.Top()+=nBorderDistanceTop; + // 25% distance to the bottom button border + const long nBorderDistanceBottom = ((aSymbolRect.GetHeight()*250)+500)/1000; + aSymbolRect.Bottom()-=nBorderDistanceBottom; + + SymbolType nSymbol = SYMBOL_SPIN_DOWN; if ( IsEmptyHeaderFooter( ) ) - { - SvtResId id( BMP_LIST_ADD ); - Image aPlusImg( id ); - Size aSize = aPlusImg.GetSizePixel(); - Point aPt = aSymbolRect.TopLeft(); - long nXOffset = ( aSymbolRect.GetWidth() - aSize.Width() ) / 2; - long nYOffset = ( aSymbolRect.GetHeight() - aSize.Height() ) / 2; - aPt += Point( nXOffset, nYOffset ); - DrawImage(aPt, aPlusImg); - } - else - { - // 25% distance to the left and right button border - const long nBorderDistanceLeftAndRight = ((aSymbolRect.GetWidth()*250)+500)/1000; - aSymbolRect.Left()+=nBorderDistanceLeftAndRight; - aSymbolRect.Right()-=nBorderDistanceLeftAndRight; - // 30% distance to the top button border - const long nBorderDistanceTop = ((aSymbolRect.GetHeight()*300)+500)/1000; - aSymbolRect.Top()+=nBorderDistanceTop; - // 25% distance to the bottom button border - const long nBorderDistanceBottom = ((aSymbolRect.GetHeight()*250)+500)/1000; - aSymbolRect.Bottom()-=nBorderDistanceBottom; - - DecorationView aDecoView( this ); - aDecoView.DrawSymbol( aSymbolRect, SYMBOL_SPIN_DOWN, - ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() - ? Color( COL_WHITE ) - : Color( COL_BLACK ) ) ); - } + nSymbol = SYMBOL_PLUS; + DecorationView aDecoView( this ); + aDecoView.DrawSymbol( aSymbolRect, nSymbol, + ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() + ? Color( COL_WHITE ) + : Color( COL_BLACK ) ) ); } } -- cgit v1.2.3