summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-09 09:45:37 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-09 09:45:37 (GMT)
commit91577a693d1bc3a123ee1f4c6e73b8a49be03aef (patch)
tree784bece558bfad6b4bb255f97d091be5e73f0c8f /src/gui
parentec44803109910127657b214f4556651a9619430d (diff)
parentdbc5757a546cdb3f1f4f80e178e76cd3cf687349 (diff)
downloadQt-91577a693d1bc3a123ee1f4c6e73b8a49be03aef.zip
Qt-91577a693d1bc3a123ee1f4c6e73b8a49be03aef.tar.gz
Qt-91577a693d1bc3a123ee1f4c6e73b8a49be03aef.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: QLabel wordwrap to respect maximumSize QT::Window palette brush fails to render correctly.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qlabel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index 42be03b..011b07a 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -682,7 +682,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const
bool tryWidth = (w < 0) && (align & Qt::TextWordWrap);
if (tryWidth)
- w = fm.averageCharWidth() * 80;
+ w = qMin(fm.averageCharWidth() * 80, q->maximumSize().width());
else if (w < 0)
w = 2000;
w -= (hextra + contentsMargin.width());