From d02339836410c82c45bbd5a0e1fb31444432fbbe Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Tue, 21 Jun 2011 16:46:15 +0200 Subject: [PATCH] Fix text decoration position for simple Text node --- src/declarative/items/qsgtextnode.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/declarative/items/qsgtextnode.cpp b/src/declarative/items/qsgtextnode.cpp index 6105137..bbfb258 100644 --- a/src/declarative/items/qsgtextnode.cpp +++ b/src/declarative/items/qsgtextnode.cpp @@ -195,7 +195,8 @@ void QSGTextNode::addTextLayout(const QPointF &position, QTextLayout *textLayout QFont font = textLayout->font(); QRawFont rawFont = QRawFont::fromFont(font); if (font.strikeOut() || font.underline() || font.overline()) { - addTextDecorations(position, rawFont, color, textLayout->boundingRect().width(), + addTextDecorations(position + QPointF(0, rawFont.ascent()), + rawFont, color, textLayout->boundingRect().width(), font.overline(), font.strikeOut(), font.underline()); } } -- 1.7.2.5