diff options
author | Igor Mironchik <igor.mironchik@gmail.com> | 2018-01-18 09:58:59 +0300 |
---|---|---|
committer | Igor Mironchik <igor.mironchik@gmail.com> | 2018-01-20 11:22:53 +0000 |
commit | 046622cdf3b6f856f67ab314c7758aca4dcf5494 (patch) | |
tree | 583f834d3beb9e0a3bbbcccbfb615358075edf35 /src | |
parent | dd58ddd5d97f0663d5fafb7e81bff4fc7db13ba7 (diff) |
Fix explicitly set width not being respected
The size of the QStaticText was always adjusted, even if setTextWidth()
was used. Now size of the QStaticText is calculated according to
the set width of the text, and if no width was set, then the
automatically adjusted size is used.
[ChangeLog][QtGui][QStaticText] Fixed explicitly set width not being
respected.
Task-number: QTBUG-65836
Change-Id: If2f9f6952fb168f4bcb6d8fabfdc7360f8a36485
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qstatictext.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index 68f33a8ed7..2f90754274 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -662,9 +662,6 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p, document.documentLayout()->draw(p, ctx); p->restore(); - if (textWidth >= 0.0) - document.adjustSize(); // Find optimal size - actualSize = document.size(); } } |