diff options
author | Rohan McGovern <rohan@mcgovern.id.au> | 2010-03-06 23:44:26 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan@mcgovern.id.au> | 2010-03-06 23:44:26 (GMT) |
commit | ad341d612129287793620bc84d3077afd64f97a4 (patch) | |
tree | 3d62b038c34985046ad1f3ff56c1c4e85a194ed2 /src/gui/dialogs | |
parent | b20ef0ade0aec89b969bd0ae7f754c680e390c67 (diff) | |
parent | 2458cb45665b0fe3144266122f876bd541de9c42 (diff) | |
download | Qt-ad341d612129287793620bc84d3077afd64f97a4.zip Qt-ad341d612129287793620bc84d3077afd64f97a4.tar.gz Qt-ad341d612129287793620bc84d3077afd64f97a4.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
configure.exe
examples/multimedia/audioinput/audioinput.cpp
src/corelib/io/qfsfileengine.cpp
src/gui/egl/qegl_wince.cpp
src/gui/egl/qeglproperties.cpp
src/gui/egl/qeglproperties_p.h
src/gui/embedded/directfb.pri
src/gui/kernel/qapplication_win.cpp
src/gui/painting/qdrawutil.cpp
src/opengl/qgl_p.h
src/sql/drivers/odbc/qsql_odbc.cpp
src/sql/drivers/odbc/qsql_odbc.h
tests/auto/auto.pro
tests/auto/qgl/tst_qgl.cpp
translations/assistant_adp_ru.ts
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qdialog.cpp | 6 | ||||
-rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 2 | ||||
-rw-r--r-- | src/gui/dialogs/qprintpreviewdialog.cpp | 13 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index fb0dba4..2d75913 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -808,11 +808,11 @@ void QDialog::setVisible(bool visible) void QDialog::showEvent(QShowEvent *event) { if (!event->spontaneous() && !testAttribute(Qt::WA_Moved)) { - Qt::WindowStates state = windowState(); + Qt::WindowStates state = windowState(); adjustPosition(parentWidget()); setAttribute(Qt::WA_Moved, false); // not really an explicit position - if (state != windowState()) - setWindowState(state); + if (state != windowState()) + setWindowState(state); } } diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index ed437ff..121ba62 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -314,6 +314,7 @@ void QMessageBoxPrivate::updateSize() } width = hardLimit; } + } #ifdef Q_WS_S60 // in S60 portait messageBoxes should always occupy maximum width if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width()){ @@ -323,7 +324,6 @@ void QMessageBoxPrivate::updateSize() width = qMin(QApplication::desktop()->size().height(), hardLimit); } #endif - } if (informativeLabel) { label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp index 6723b53..f21343e 100644 --- a/src/gui/dialogs/qprintpreviewdialog.cpp +++ b/src/gui/dialogs/qprintpreviewdialog.cpp @@ -273,7 +273,20 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer) QWidget *pageEdit = new QWidget(toolbar); QVBoxLayout *vboxLayout = new QVBoxLayout; vboxLayout->setContentsMargins(0, 0, 0, 0); +#ifdef Q_WS_MAC + // We query the widgets about their size and then we fix the size. + // This should do the trick for the laying out part... + QSize pageNumEditSize, pageNumLabelSize; + pageNumEditSize = pageNumEdit->minimumSizeHint(); + pageNumLabelSize = pageNumLabel->minimumSizeHint(); + pageNumEdit->resize(pageNumEditSize); + pageNumLabel->resize(pageNumLabelSize); +#endif QFormLayout *formLayout = new QFormLayout; +#ifdef Q_WS_MAC + // We have to change the growth policy in Mac. + formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); +#endif formLayout->setWidget(0, QFormLayout::LabelRole, pageNumEdit); formLayout->setWidget(0, QFormLayout::FieldRole, pageNumLabel); vboxLayout->addLayout(formLayout); |