diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-09-28 11:55:00 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-09-28 11:55:00 (GMT) |
commit | d81ddfd44455c79d0a44ab1caf29939b287dd895 (patch) | |
tree | 9b4383c5c23b405170ff9b2b5edb6762165828bb /src/gui/widgets | |
parent | 89ae1ec634f82f89e97f3e19b5d5fb0da9b3092f (diff) | |
parent | c75aabbb022e3c2db246e2fd90a36662cf28ec24 (diff) | |
download | Qt-d81ddfd44455c79d0a44ab1caf29939b287dd895.zip Qt-d81ddfd44455c79d0a44ab1caf29939b287dd895.tar.gz Qt-d81ddfd44455c79d0a44ab1caf29939b287dd895.tar.bz2 |
Merge remote-tracking branch 'mainline/4.8'
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qlabel.cpp | 8 |
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()); |