Commit b04c4868 authored by con's avatar con Committed by Eike Ziller
Browse files

Fixes to CMake wizard layout.

Text on the first page had big left margin.
The cmake arguments + generator + run button on one line were too wide
(on Mac resulting in a non-usable arguments line edit).

Change-Id: Idde43e1acd8f9822c1bfc3d3f3149f254a8a2843

Reviewed-by: default avatarQt Sanity Bot <>
Reviewed-by: default avatarDaniel Teske <>
parent 25daed2f
...@@ -255,7 +255,7 @@ ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool chang ...@@ -255,7 +255,7 @@ ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool chang
"Qt Creator recommends to not use the source directory for building. " "Qt Creator recommends to not use the source directory for building. "
"This ensures that the source directory remains clean and enables multiple builds " "This ensures that the source directory remains clean and enables multiple builds "
"with different settings.")); "with different settings."));
fl->addWidget(label); fl->addRow(label);
m_pc = new Utils::PathChooser(this); m_pc = new Utils::PathChooser(this);
m_pc->setBaseDirectory(m_cmakeWizard->sourceDirectory()); m_pc->setBaseDirectory(m_cmakeWizard->sourceDirectory());
m_pc->setPath(m_cmakeWizard->buildDirectory()); m_pc->setPath(m_cmakeWizard->buildDirectory());
...@@ -282,6 +282,7 @@ CMakeRunPage::CMakeRunPage(CMakeOpenProjectWizard *cmakeWizard, Mode mode, const ...@@ -282,6 +282,7 @@ CMakeRunPage::CMakeRunPage(CMakeOpenProjectWizard *cmakeWizard, Mode mode, const
void CMakeRunPage::initWidgets() void CMakeRunPage::initWidgets()
{ {
QFormLayout *fl = new QFormLayout; QFormLayout *fl = new QFormLayout;
setLayout(fl); setLayout(fl);
// Description Label // Description Label
m_descriptionLabel = new QLabel(this); m_descriptionLabel = new QLabel(this);
...@@ -304,33 +305,38 @@ void CMakeRunPage::initWidgets() ...@@ -304,33 +305,38 @@ void CMakeRunPage::initWidgets()
text += tr(" The path %1 is not a valid cmake.").arg(cmakeExecutable); text += tr(" The path %1 is not a valid cmake.").arg(cmakeExecutable);
} }
fl->addRow(new QLabel(text, this)); QLabel *cmakeLabel = new QLabel(text);
// Show a field for the user to enter // Show a field for the user to enter
m_cmakeExecutable = new Utils::PathChooser(this); m_cmakeExecutable = new Utils::PathChooser(this);
m_cmakeExecutable->setExpectedKind(Utils::PathChooser::ExistingCommand); m_cmakeExecutable->setExpectedKind(Utils::PathChooser::ExistingCommand);
fl->addRow("cmake Executable", m_cmakeExecutable); fl->addRow("cmake Executable:", m_cmakeExecutable);
} }
// Run CMake Line (with arguments) // Run CMake Line (with arguments)
m_argumentsLineEdit = new QLineEdit(this); m_argumentsLineEdit = new QLineEdit(this);
connect(m_argumentsLineEdit,SIGNAL(returnPressed()), this, SLOT(runCMake())); connect(m_argumentsLineEdit,SIGNAL(returnPressed()), this, SLOT(runCMake()));
fl->addRow(tr("Arguments:"), m_argumentsLineEdit);
m_generatorComboBox = new QComboBox(this); m_generatorComboBox = new QComboBox(this);
fl->addRow(tr("Generator:"), m_generatorComboBox);
m_runCMake = new QPushButton(this); m_runCMake = new QPushButton(this);
m_runCMake->setText(tr("Run CMake")); m_runCMake->setText(tr("Run CMake"));
connect(m_runCMake, SIGNAL(clicked()), this, SLOT(runCMake())); connect(m_runCMake, SIGNAL(clicked()), this, SLOT(runCMake()));
QHBoxLayout *hbox = new QHBoxLayout; QHBoxLayout *hbox2 = new QHBoxLayout;
hbox->addWidget(m_argumentsLineEdit); hbox2->addStretch(10);
hbox->addWidget(m_generatorComboBox); hbox2->addWidget(m_runCMake);
hbox->addWidget(m_runCMake); fl->addRow(hbox2);
fl->addRow(tr("Arguments"), hbox);
// Bottom output window // Bottom output window
m_output = new QPlainTextEdit(this); m_output = new QPlainTextEdit(this);
m_output->setReadOnly(true); m_output->setReadOnly(true);
// set smaller minimum size to avoid vanishing descriptions if all of the
// above is shown and the dialog not vertically resizing to fit stuff in (Mac)
QFont f(TextEditor::FontSettings::defaultFixedFontFamily()); QFont f(TextEditor::FontSettings::defaultFixedFontFamily());
f.setStyleHint(QFont::TypeWriter); f.setStyleHint(QFont::TypeWriter);
m_output->setFont(f); m_output->setFont(f);
Supports Markdown
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