aboutsummaryrefslogtreecommitdiff
path: root/lib/gdi/grc.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-11-24 19:24:47 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-11-24 19:24:47 +0000
commit9f0676bf1c67c28f7ffb114bcff785d455d7b509 (patch)
tree1b2c94bf28022673acd17281e0c300888cd881cd /lib/gdi/grc.cpp
parent66238a69f495173897e7e1e62a7f05ff4356ae44 (diff)
downloadenigma2-9f0676bf1c67c28f7ffb114bcff785d455d7b509.tar.gz
enigma2-9f0676bf1c67c28f7ffb114bcff785d455d7b509.zip
fix RT_VALIGN_CENTER
Diffstat (limited to 'lib/gdi/grc.cpp')
-rw-r--r--lib/gdi/grc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gdi/grc.cpp b/lib/gdi/grc.cpp
index 55d266c0..7f884024 100644
--- a/lib/gdi/grc.cpp
+++ b/lib/gdi/grc.cpp
@@ -442,7 +442,9 @@ void gDC::exec(gOpcode *o)
if (o->parm.renderText->flags & gPainter::RT_VALIGN_CENTER)
{
eRect bbox = para->getBoundBox();
- offset += ePoint(0, (o->parm.renderText->area.height() - bbox.height()) / 2);
+ int vcentered_top = (o->parm.renderText->area.height() - bbox.height()) / 2;
+ int correction = vcentered_top - bbox.top();
+ offset += ePoint(0, correction);
}
para->blit(*this, offset, getRGB(m_background_color), getRGB(m_foreground_color));
delete o->parm.renderText;