summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@nokia.com>2012-08-06 11:11:05 +0200
committerhjk <qthjk@ovi.com>2012-08-06 11:36:31 +0200
commita0fa7fd39fbfc11dceec3f197252f97adf104383 (patch)
tree1278d7ab716d4e5d5d1619d1c3e1f3f7bd03b986 /src/plugins/projectexplorer
parent156bfd2e7f0711c4ca8b3323e390011f93cd5da6 (diff)
downloadqt-creator-a0fa7fd39fbfc11dceec3f197252f97adf104383.tar.gz
Layout fixes for target settings.
More horizontal and vertical space. Change-Id: Ieae970d9ac15df32531fb934799eff6d589bc3e4 Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/profilemodel.cpp3
-rw-r--r--src/plugins/projectexplorer/profileoptionspage.cpp22
-rw-r--r--src/plugins/projectexplorer/profileoptionspage.h2
3 files changed, 12 insertions, 15 deletions
diff --git a/src/plugins/projectexplorer/profilemodel.cpp b/src/plugins/projectexplorer/profilemodel.cpp
index ebcf76b88c..3b7b499187 100644
--- a/src/plugins/projectexplorer/profilemodel.cpp
+++ b/src/plugins/projectexplorer/profilemodel.cpp
@@ -425,7 +425,8 @@ ProfileNode *ProfileModel::createNode(ProfileNode *parent, Profile *p, bool chan
{
ProfileNode *node = new ProfileNode(parent, p, changed);
if (node->widget) {
- m_parentLayout->addWidget(node->widget);
+ node->widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_parentLayout->addWidget(node->widget, 10);
connect(node->widget, SIGNAL(dirty()),
this, SLOT(setDirty()));
}
diff --git a/src/plugins/projectexplorer/profileoptionspage.cpp b/src/plugins/projectexplorer/profileoptionspage.cpp
index 1e00bb2b7a..2742bd9db5 100644
--- a/src/plugins/projectexplorer/profileoptionspage.cpp
+++ b/src/plugins/projectexplorer/profileoptionspage.cpp
@@ -64,19 +64,15 @@ ProfileOptionsPage::ProfileOptionsPage() :
setCategoryIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
}
-struct SmallTreeView : QTreeView
-{
- explicit SmallTreeView(QWidget *parent) : QTreeView(parent) {}
- QSize sizeHint() const { return QSize(256, 150); }
-};
-
QWidget *ProfileOptionsPage::createPage(QWidget *parent)
{
m_configWidget = new QWidget(parent);
- m_profilesView = new SmallTreeView(m_configWidget);
+ m_profilesView = new QTreeView(m_configWidget);
m_profilesView->setUniformRowHeights(true);
m_profilesView->header()->setStretchLastSection(true);
+ m_profilesView->setSizePolicy(m_profilesView->sizePolicy().horizontalPolicy(),
+ QSizePolicy::Ignored);
m_addButton = new QPushButton(tr("Add"), m_configWidget);
m_cloneButton = new QPushButton(tr("Clone"), m_configWidget);
@@ -89,15 +85,15 @@ QWidget *ProfileOptionsPage::createPage(QWidget *parent)
buttonLayout->addWidget(m_cloneButton);
buttonLayout->addWidget(m_delButton);
buttonLayout->addWidget(m_makeDefaultButton);
- buttonLayout->addItem(new QSpacerItem(10, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ buttonLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
- QVBoxLayout *verticalLayout = new QVBoxLayout();
- verticalLayout->addWidget(m_profilesView);
-
- QHBoxLayout *horizontalLayout = new QHBoxLayout(m_configWidget);
- horizontalLayout->addLayout(verticalLayout);
+ QHBoxLayout *horizontalLayout = new QHBoxLayout();
+ horizontalLayout->addWidget(m_profilesView);
horizontalLayout->addLayout(buttonLayout);
+ QVBoxLayout *verticalLayout = new QVBoxLayout(m_configWidget);
+ verticalLayout->addLayout(horizontalLayout);
+
Q_ASSERT(!m_model);
m_model = new Internal::ProfileModel(verticalLayout);
connect(m_model, SIGNAL(profileStateChanged()), this, SLOT(updateState()));
diff --git a/src/plugins/projectexplorer/profileoptionspage.h b/src/plugins/projectexplorer/profileoptionspage.h
index a8e1c60bec..87e35672dc 100644
--- a/src/plugins/projectexplorer/profileoptionspage.h
+++ b/src/plugins/projectexplorer/profileoptionspage.h
@@ -92,7 +92,7 @@ private:
Internal::ProfileModel *m_model;
QItemSelectionModel *m_selectionModel;
- ProfileConfigWidget *m_currentWidget;
+ QWidget *m_currentWidget;
Profile *m_toShow;
};