diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-16 11:54:08 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-16 12:08:45 +0400 |
commit | ca9541a95263ea30e856ce78468b67c095b66c4d (patch) | |
tree | 4bae7d10e091c7c94113e5cff7cdf3bd095d945b /sw | |
parent | f10f5ca011c3d06d3470b9e21bda13d505cfe93e (diff) |
HeaderFooterWin: center text vertically
since we use FontMetric::GetAscent to determine text baseine position in Paint
it IMO makes sense to use FontMetric::GetLineHeight to determine button height,
not GetTextBoundRect which returns somewhat smaller height.
Change-Id: Iaea203a29293f9ee9b841e1a8e8aebf2dc8e1920
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/docvw/HeaderFooterWin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index edb65e6b7b64..20170cfc8eee 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -190,9 +190,9 @@ void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long nXLineE Rectangle aTextRect; GetTextBoundRect( aTextRect, String( m_sLabel ) ); Rectangle aTextPxRect = LogicToPixel( aTextRect ); - + FontMetric aFontMetric = GetFontMetric( GetFont() ); Size aBoxSize ( aTextPxRect.GetWidth() + BUTTON_WIDTH + TEXT_PADDING * 2, - aTextPxRect.GetHeight() + TEXT_PADDING * 2 ); + aFontMetric.GetLineHeight() + TEXT_PADDING * 2 ); long nYFooterOff = 0; if ( !m_bIsHeader ) |