diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-11-15 11:08:12 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-11-16 07:37:31 (GMT) |
commit | 550d1d75740cda5be718b7ab36bb517ebb190439 (patch) | |
tree | f9d331ad45b2bbdd96bcdfbd060534c10fedbf14 /src/declarative | |
parent | 4c19a340f0c16d2042bfc8829b88ba08a0a22699 (diff) | |
download | Qt-550d1d75740cda5be718b7ab36bb517ebb190439.zip Qt-550d1d75740cda5be718b7ab36bb517ebb190439.tar.gz Qt-550d1d75740cda5be718b7ab36bb517ebb190439.tar.bz2 |
Fix alignment of non-wrapped richtext QML Text elements.
QTextDocument needs to know the actual control width rather than
the text width to be able to align the text to the control.
Task-number: ou1cimx1#934687
Reviewed-by: Joona Petrell
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 20e4eef..684dc5a 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -289,7 +289,7 @@ void QDeclarativeTextPrivate::updateSize() doc->setTextWidth(-1); naturalWidth = doc->idealWidth(); } - if (wrapMode != QDeclarativeText::NoWrap && q->widthValid()) + if (q->widthValid()) doc->setTextWidth(q->width()); else doc->setTextWidth(doc->idealWidth()); // ### Text does not align if width is not set (QTextDoc bug) |