summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorPasi Pentikainen <pasi.a.pentikainen@nokia.com>2011-09-22 08:14:33 (GMT)
committerPasi Pentikainen <pasi.a.pentikainen@nokia.com>2011-09-22 08:14:33 (GMT)
commit7b0ad143af1f3246ff75b46d7cb57632e276f763 (patch)
treea8c4932ec1d1cde717487ebd3b7032ee57390a71 /src/gui
parent6aa506e1d863e5bb7642d4947be0d8c8c9b24d33 (diff)
parentb0fbf9dae591dc839e14a087c1d69189e3fe9461 (diff)
downloadQt-7b0ad143af1f3246ff75b46d7cb57632e276f763.zip
Qt-7b0ad143af1f3246ff75b46d7cb57632e276f763.tar.gz
Qt-7b0ad143af1f3246ff75b46d7cb57632e276f763.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-flex
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qlabel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index ab88f38..c0be3e1 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -59,6 +59,10 @@
#include <qaccessible.h>
#endif
+#ifdef Q_OS_SYMBIAN
+#include "qt_s60_p.h"
+#endif
+
QT_BEGIN_NAMESPACE
/*!
@@ -698,7 +702,11 @@ QSize QLabelPrivate::sizeForWidth(int w) const
bool tryWidth = (w < 0) && (align & Qt::TextWordWrap);
if (tryWidth)
+#ifdef Q_OS_SYMBIAN
+ w = qMin(S60->clientRect().Width(), q->maximumSize().width());
+#else
w = qMin(fm.averageCharWidth() * 80, q->maximumSize().width());
+#endif
else if (w < 0)
w = 2000;
w -= (hextra + contentsMargin.width());