diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-10-29 05:26:50 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-10-29 05:28:16 (GMT) |
commit | 95ef9a3d7eb851d47dabe3248672ea03e5faa0ce (patch) | |
tree | d0f7cdb36472ce88d18bf931b8243e4fda99553f /src/declarative/graphicsitems | |
parent | 8e3a0c2df1cff2ca960555ad16654ff77f7efcc8 (diff) | |
download | Qt-95ef9a3d7eb851d47dabe3248672ea03e5faa0ce.zip Qt-95ef9a3d7eb851d47dabe3248672ea03e5faa0ce.tar.gz Qt-95ef9a3d7eb851d47dabe3248672ea03e5faa0ce.tar.bz2 |
Regression: horizontal alignment bug with single line text
Task-number: QTBUG-14841
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 865af2d..03c9765 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -292,12 +292,12 @@ QSize QDeclarativeTextPrivate::setupTextLayout() qreal lineWidth = 0; //set manual width - if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid()) + if (q->widthValid()) lineWidth = q->width(); QTextOption textOption = layout.textOption(); textOption.setWrapMode(QTextOption::WrapMode(wrapMode)); - textOption.setAlignment((Qt::Alignment)hAlign); + textOption.setAlignment(Qt::Alignment(hAlign)); layout.setTextOption(textOption); layout.beginLayout(); @@ -306,7 +306,7 @@ QSize QDeclarativeTextPrivate::setupTextLayout() if (!line.isValid()) break; - if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid()) { + if (q->widthValid()) { line.setLineWidth(lineWidth); line.setPosition(QPointF(0, height)); height += line.height(); |