summaryrefslogtreecommitdiff
path: root/sw/source/ui/docvw/HeaderFooterWin.cxx
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-09-13 14:42:17 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-09-13 17:29:04 +0200
commit883991e8470075be1ade56595a90040d1ad64f6c (patch)
treec9ced72a3e522720b2570f39d5304decdc749be1 /sw/source/ui/docvw/HeaderFooterWin.cxx
parent99e1ea3c3f22388d9f4215b3914828f79e22cf83 (diff)
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.
Diffstat (limited to 'sw/source/ui/docvw/HeaderFooterWin.cxx')
-rw-r--r--sw/source/ui/docvw/HeaderFooterWin.cxx47
1 files changed, 18 insertions, 29 deletions
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 ) ) );
}
}