diff options
author | Toby Tomkins <toby.tomkins@nokia.com> | 2010-04-01 01:23:42 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-04-01 01:23:42 (GMT) |
commit | 878a99e89dd1c542f4bfb3e88f42f4a57ccf0b50 (patch) | |
tree | 230923d501ba4bdb9be1806d44e43fbfb6ccb9b3 /src/gui/dialogs/qmessagebox.cpp | |
parent | 49c16ca689d09120587acd235df9085622645d62 (diff) | |
parent | f2625271f7c878c00fea38291cd11c34c80550fa (diff) | |
download | Qt-878a99e89dd1c542f4bfb3e88f42f4a57ccf0b50.zip Qt-878a99e89dd1c542f4bfb3e88f42f4a57ccf0b50.tar.gz Qt-878a99e89dd1c542f4bfb3e88f42f4a57ccf0b50.tar.bz2 |
Merge commit 'origin/4.6' into 4.6-multimedia
Conflicts:
tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
Diffstat (limited to 'src/gui/dialogs/qmessagebox.cpp')
-rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index bd2df9c..ccc925c 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -65,6 +65,10 @@ #include <QtGui/qfontmetrics.h> #include <QtGui/qclipboard.h> +#ifndef QT_NO_STYLE_S60 +#include <qs60style.h> +#endif + #ifdef Q_WS_WINCE extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_smartphone();//defined in qguifunctions_wince.cpp @@ -353,6 +357,16 @@ void QMessageBoxPrivate::updateSize() int height = (layout->hasHeightForWidth()) ? layout->totalHeightForWidth(width) : layout->totalMinimumSize().height(); + +#ifndef QT_NO_STYLE_S60 + QS60Style *s60Style = 0; + s60Style = qobject_cast<QS60Style *>(QApplication::style()); + + //use custom pixel metric to deduce the minimum height of the messagebox + if (s60Style) + height = qMax(height, s60Style->pixelMetric((QStyle::PixelMetric)PM_MessageBoxHeight)); +#endif + q->setFixedSize(width, height); QCoreApplication::removePostedEvents(q, QEvent::LayoutRequest); } |