Commit 3955df78 authored by Eike Ziller's avatar Eike Ziller

Move wizards' cancel button to the left on Mac.

It is too far to the left now, but that can't be helped
(it's a Qt limitation).

Task-number: QTCREATORBUG-6156
Change-Id: I0201356234abb618dc3b573673d512c0a97c4839
Reviewed-on: http://codereview.qt-project.org/5406Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 57c3ab22
......@@ -51,6 +51,15 @@ FileWizardDialog::FileWizardDialog(QWidget *parent) :
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setOption(QWizard::NoCancelButton, false);
setOption(QWizard::NoDefaultButton, false);
#ifdef Q_OS_MAC
setButtonLayout(QList<QWizard::WizardButton>()
<< QWizard::CancelButton
<< QWizard::Stretch
<< QWizard::BackButton
<< QWizard::NextButton
<< QWizard::CommitButton
<< QWizard::FinishButton);
#endif
const int filePageId = addPage(m_filePage);
wizardProgress()->item(filePageId)->setTitle(tr("Location"));
connect(m_filePage, SIGNAL(activated()), button(QWizard::FinishButton), SLOT(animateClick()));
......
......@@ -539,6 +539,16 @@ void BaseFileWizard::setupWizard(QWizard *w)
w->setOption(QWizard::NoDefaultButton, false);
w->setOption(QWizard::NoBackButtonOnStartPage, true);
w->setWindowFlags(w->windowFlags() & ~Qt::WindowContextHelpButtonHint);
#ifdef Q_OS_MAC
w->setButtonLayout(QList<QWizard::WizardButton>()
<< QWizard::CancelButton
<< QWizard::Stretch
<< QWizard::BackButton
<< QWizard::NextButton
<< QWizard::CommitButton
<< QWizard::FinishButton);
#endif
}
/*!
......
......@@ -55,8 +55,18 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
setupTargetPage();
setOption(QWizard::NoBackButtonOnLastPage, true);
setOption(QWizard::NoCancelButton, false);
setOption(QWizard::NoDefaultButton, false);
setOption(QWizard::NoBackButtonOnLastPage, true);
#ifdef Q_OS_MAC
setButtonLayout(QList<QWizard::WizardButton>()
<< QWizard::CancelButton
<< QWizard::Stretch
<< QWizard::BackButton
<< QWizard::NextButton
<< QWizard::CommitButton
<< QWizard::FinishButton);
#endif
}
// We don't want to actually show the dialog if we don't show the import page
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment