diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-07-04 12:50:14 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-07-04 12:50:14 (GMT) |
commit | 39b598cbf387e3939d7a9e72b5e69b59839ae473 (patch) | |
tree | 2e98fb879718095573928fdd1ef258de5a446d5c /src/gui/dialogs/qmessagebox.cpp | |
parent | 685d89b68dd11263d53a2c0982f057965f7262f2 (diff) | |
download | Qt-39b598cbf387e3939d7a9e72b5e69b59839ae473.zip Qt-39b598cbf387e3939d7a9e72b5e69b59839ae473.tar.gz Qt-39b598cbf387e3939d7a9e72b5e69b59839ae473.tar.bz2 |
On symbian QMessageBox icon is on different side than in native dialog
In Symbian dialogs have layout (on LeftToRight UIs)
where icon is on the right and text on left.
Whereas, Qt by default has icon on the left and text on the right.
Fix Qt dialogs to behave like native ones on Symbian.
Task-number: QTBUG-9924
Reviewed-by: Tomi Vihria
Diffstat (limited to 'src/gui/dialogs/qmessagebox.cpp')
-rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index 7d209fb..6a1c04a 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -259,8 +259,15 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text) QGridLayout *grid = new QGridLayout; #ifndef Q_WS_MAC - grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop); - grid->addWidget(label, 0, 1, 1, 1); +#ifdef Q_WS_S60 + const int preferredIconColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 1 : 0; + const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1; +#else + const int preferredIconColumn = 0; + const int preferredTextColumn = 1; +#endif + grid->addWidget(iconLabel, 0, preferredIconColumn, 2, 1, Qt::AlignTop); + grid->addWidget(label, 0, preferredTextColumn, 1, 1); // -- leave space for information label -- grid->addWidget(buttonBox, 2, 0, 1, 2); #else |