summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2023-03-07 14:51:03 +0100
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2023-03-08 09:59:13 +0000
commit68b6d507342a440b5441882e74587054d530687b (patch)
tree92bf36923cac7d9343c4738013575f57c18c98d8
parentcb9713daa1a2ce0d5551fa10d6cc12084730fa58 (diff)
Vertically center statusbar images
Change-Id: Iecdeeda5c10b2322bdf71e84864ed8104581589f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148424 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r--svx/source/stbctrls/pszctrl.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index cd103e258600..76105b844028 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -449,8 +449,12 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
rRect.Left() + rRect.GetWidth() / 2 + PAINT_OFFSET;
// draw position
Point aPnt = rRect.TopLeft();
- aPnt.setY( aItemPos.Y() );
aPnt.AdjustX(PAINT_OFFSET );
+ // vertically centered
+ const tools::Long nSizePosY =
+ (rRect.GetHeight() - pImpl->aPosImage.GetSizePixel().Height()) / 2;
+ aPnt.AdjustY( nSizePosY );
+
pDev->DrawImage( aPnt, pImpl->aPosImage );
aPnt.AdjustX(pImpl->aPosImage.GetSizePixel().Width() );
aPnt.AdjustX(PAINT_OFFSET );