Commit 28560dc3 authored by Daniel Teske's avatar Daniel Teske
Browse files

Tweak import layout on TargetSetupPage



Expand the import path line edit.

Change-Id: Iaa7bfd5308a2d94be9adef761499c16d918cc63d
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 58f8d43f
......@@ -513,6 +513,7 @@ Qt4DefaultTargetSetupWidget::Qt4DefaultTargetSetupWidget(Qt4BaseTargetFactory *f
m_importLinePath = new Utils::PathChooser();
m_importLinePath->setExpectedKind(Utils::PathChooser::ExistingDirectory);
m_importLinePath->setPath(sourceDir);
m_importLinePath->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_importLineLayout->addWidget(m_importLinePath);
m_importLineButton = new QPushButton;
......@@ -521,7 +522,8 @@ Qt4DefaultTargetSetupWidget::Qt4DefaultTargetSetupWidget(Qt4BaseTargetFactory *f
// make it in line with import path chooser button on mac
m_importLineButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
m_importLineLayout->addWidget(m_importLineButton);
m_importLineLayout->addStretch();
m_importLineStretch = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
m_importLineLayout->addSpacerItem(m_importLineStretch);
layout->addWidget(w);
m_importLineLabel->setVisible(false);
......@@ -771,6 +773,8 @@ void Qt4DefaultTargetSetupWidget::addImportClicked()
m_importLineLabel->setVisible(true);
m_importLinePath->setVisible(true);
m_importLineButton->setAttribute(Qt::WA_MacNormalSize);
m_importLineStretch->changeSize(0,0, QSizePolicy::Fixed, QSizePolicy::Fixed);
m_importLineLayout->invalidate();
return;
}
QList<BuildConfigurationInfo> infos = BuildConfigurationInfo::checkForBuild(m_importLinePath->path(), m_proFilePath);
......
......@@ -39,6 +39,8 @@
#include <projectexplorer/target.h>
#include <projectexplorer/task.h>
#include <QtGui/QSpacerItem>
namespace Utils {
class DetailsWidget;
class PathChooser;
......@@ -177,6 +179,7 @@ private:
QLabel *m_importLineLabel;
Utils::PathChooser *m_importLinePath;
QPushButton *m_importLineButton;
QSpacerItem *m_importLineStretch;
void setupWidgets();
void clearWidgets();
......
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