Fix positioning of many text items.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-01-29 13:48:06 -02:00 committed by Dirk Hohndel
parent 354acb0fe6
commit 042c34df09
3 changed files with 10 additions and 13 deletions

View file

@ -57,7 +57,7 @@ void DiveTextItem::updateText()
qreal xPos = 0, yPos = 0;
QRectF rect = fm.boundingRect(internalText);
yPos = (internalAlignFlags & Qt::AlignTop) ? -rect.height() :
yPos = (internalAlignFlags & Qt::AlignTop) ? 0 :
(internalAlignFlags & Qt::AlignBottom) ? +rect.height() :
/*(internalAlignFlags & Qt::AlignVCenter ? */ +rect.height() / 4;