diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-09-07 18:03:59 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-09-08 15:42:58 +0200 |
commit | 1291efeee9ee4079e6bb38e0b06e9f73c365c7a0 (patch) | |
tree | 17448af97a072c5f3d457aec0abe6624c0f65739 /sw | |
parent | 4115a81bea06eb9cb3ea7b6d8819a35a8a8de52b (diff) |
Header/Footer: vertically center the text in the separator control
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/docvw/HeaderFooterWin.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 9ba49fcb0994..0665064b830d 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -168,10 +168,13 @@ void SwHeaderFooterWin::Paint( const Rectangle& ) lcl_DrawBackground( this, aRect, m_bIsHeader ); // Draw the text + Rectangle aTextRect; + GetTextBoundRect( aTextRect, String( m_sLabel ) ); + Point aTextPos = aTextRect.TopLeft() + Point( TEXT_PADDING, 0 ); + basegfx::BColor aLineColor = SwViewOption::GetHeaderFooterMarkColor().getBColor(); SetTextColor( Color( aLineColor ) ); - DrawText( Point( aRect.Left() + TEXT_PADDING, aRect.Top() + TEXT_PADDING ), - String( m_sLabel ) ); + DrawText( aTextPos, String( m_sLabel ) ); } bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) |