From 1291efeee9ee4079e6bb38e0b06e9f73c365c7a0 Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Wed, 7 Sep 2011 18:03:59 +0200 Subject: Header/Footer: vertically center the text in the separator control --- sw/source/ui/docvw/HeaderFooterWin.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sw/source/ui/docvw') 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( ) -- cgit v1.2.3