diff --git a/src/libs/utils/detailswidget.cpp b/src/libs/utils/detailswidget.cpp index 7b8053ce12937f203898f04e46fe3f6eb3d7457a..9a1e68b1edfae6e3a0fc9ded2b9976d1ff0ad7e0 100644 --- a/src/libs/utils/detailswidget.cpp +++ b/src/libs/utils/detailswidget.cpp @@ -47,9 +47,9 @@ namespace Utils { // in the following way: // // +------------+-------------------------+---------------+ - // + toolWidget | summaryLabel | detailsButton | + // +summaryLabel| toolwidget | detailsButton | // +------------+-------------------------+---------------+ - // | | widget | + // | widget | // +------------+-------------------------+---------------+ struct DetailsWidgetPrivate { @@ -89,7 +89,7 @@ namespace Utils { d->m_grid->setContentsMargins(0, 0, 0, 0); d->m_grid->setSpacing(0); - d->m_grid->addWidget(d->m_summaryLabel, 0, 1); + d->m_grid->addWidget(d->m_summaryLabel, 0, 0); d->m_grid->addWidget(d->m_detailsButton, 0, 2); setLayout(d->m_grid); @@ -206,7 +206,7 @@ namespace Utils { if (d->m_widget) { d->m_widget->setContentsMargins(MARGIN, MARGIN, MARGIN, MARGIN); - d->m_grid->addWidget(d->m_widget, 1, 1, 1, 2); + d->m_grid->addWidget(d->m_widget, 1, 0, 1, 3); } updateControls(); } @@ -224,9 +224,6 @@ namespace Utils { d->m_toolWidget->adjustSize(); d->m_grid->addWidget(d->m_toolWidget, 0, 1, 1, 1, Qt::AlignRight); - d->m_grid->setColumnMinimumWidth(0, d->m_toolWidget->width()); - d->m_grid->setRowMinimumHeight(0, d->m_toolWidget->height()); - changeHoverState(d->m_hovered); } diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp index cc8f99c4ce9429d20b5d02f4fc443874ed78a98d..11454fe015d2dd286bc6c3eae4a39f48e11bbe72 100644 --- a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp +++ b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp @@ -118,8 +118,7 @@ BuildSettingsWidget::~BuildSettingsWidget() BuildSettingsWidget::BuildSettingsWidget(Target *target) : m_target(target), - m_buildConfiguration(0), - m_leftMargin(0) + m_buildConfiguration(0) { Q_ASSERT(m_target); setupUi(); @@ -127,7 +126,6 @@ BuildSettingsWidget::BuildSettingsWidget(Target *target) : void BuildSettingsWidget::setupUi() { - m_leftMargin = Constants::PANEL_LEFT_MARGIN; QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setContentsMargins(0, 0, 0, 0); @@ -145,7 +143,7 @@ void BuildSettingsWidget::setupUi() { // Edit Build Configuration row QHBoxLayout *hbox = new QHBoxLayout(); - hbox->setContentsMargins(m_leftMargin, 0, 0, 0); + hbox->setContentsMargins(0, 0, 0, 0); hbox->addWidget(new QLabel(tr("Edit build configuration:"), this)); m_buildConfigurationComboBox = new QComboBox(this); m_buildConfigurationComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents); @@ -191,7 +189,7 @@ void BuildSettingsWidget::setupUi() void BuildSettingsWidget::addSubWidget(const QString &name, BuildConfigWidget *widget) { - widget->setContentsMargins(m_leftMargin, 10, 0, 0); + widget->setContentsMargins(0, 10, 0, 0); QLabel *label = new QLabel(this); label->setText(name); @@ -200,7 +198,7 @@ void BuildSettingsWidget::addSubWidget(const QString &name, BuildConfigWidget *w f.setPointSizeF(f.pointSizeF() * 1.2); label->setFont(f); - label->setContentsMargins(m_leftMargin, 10, 0, 0); + label->setContentsMargins(0, 10, 0, 0); layout()->addWidget(label); layout()->addWidget(widget); diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.h b/src/plugins/projectexplorer/buildsettingspropertiespage.h index e93f849c90ce73cc30554f3e3330b7495b7633f0..444e381b1424d6b77ceceb9b051330473a67c2a6 100644 --- a/src/plugins/projectexplorer/buildsettingspropertiespage.h +++ b/src/plugins/projectexplorer/buildsettingspropertiespage.h @@ -71,7 +71,6 @@ public: QString displayName() const; QWidget *widget() const; QIcon icon() const; - PanelFlags flags() const { return IPropertiesPanel::NoLeftMargin; } private: BuildSettingsWidget *m_widget; @@ -119,8 +118,6 @@ private: QList<BuildConfigWidget *> m_subWidgets; QList<QLabel *> m_labels; - - int m_leftMargin; }; } // namespace Internal diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp index ffb06bc9eb6b9eff22bdf48c562e8c5b111e871c..25cf61e9b54cccb14cfaab1d8921deacead70ff3 100644 --- a/src/plugins/projectexplorer/buildstepspage.cpp +++ b/src/plugins/projectexplorer/buildstepspage.cpp @@ -53,10 +53,10 @@ using namespace ProjectExplorer::Internal; BuildStepsPage::BuildStepsPage(Target *target, StepType type) : BuildConfigWidget(), m_type(type), - m_addButton(0), - m_leftMargin(-1) + m_addButton(0) { Q_UNUSED(target); + setStyleSheet("background: red"); } BuildStepsPage::~BuildStepsPage() @@ -200,8 +200,7 @@ void BuildStepsPage::addBuildStepWidget(int pos, BuildStep *step) s.detailsWidget->setToolWidget(toolWidget); - const int leftMargin(qMax(m_leftMargin - toolWidget->width(), 0)); - s.detailsWidget->setContentsMargins(leftMargin, 0, 0, 1); + s.detailsWidget->setContentsMargins(0, 0, 0, 1); m_buildSteps.insert(pos, s); @@ -276,11 +275,6 @@ void BuildStepsPage::setupUi() if (0 != m_addButton) return; - QMargins margins(contentsMargins()); - m_leftMargin = margins.left(); - margins.setLeft(0); - setContentsMargins(margins); - m_upMapper = new QSignalMapper(this); connect(m_upMapper, SIGNAL(mapped(int)), this, SLOT(stepMoveUp(int))); @@ -296,11 +290,11 @@ void BuildStepsPage::setupUi() m_vbox->setSpacing(0); m_noStepsLabel = new QLabel(tr("No Build Steps"), this); - m_noStepsLabel->setContentsMargins(m_leftMargin, 0, 0, 0); + m_noStepsLabel->setContentsMargins(0, 0, 0, 0); m_vbox->addWidget(m_noStepsLabel); QHBoxLayout *hboxLayout = new QHBoxLayout(); - hboxLayout->setContentsMargins(m_leftMargin, 4, 0, 0); + hboxLayout->setContentsMargins(0, 4, 0, 0); m_addButton = new QPushButton(this); m_addButton->setText(m_type == Clean ? tr("Add Clean Step") : tr("Add Build Step")); m_addButton->setMenu(new QMenu(this)); diff --git a/src/plugins/projectexplorer/iprojectproperties.h b/src/plugins/projectexplorer/iprojectproperties.h index 63b7df301f7609167739ec1cc55b1e0443d7bd9d..052e3dceadf7c591c35690e4401ecadbe0496638 100644 --- a/src/plugins/projectexplorer/iprojectproperties.h +++ b/src/plugins/projectexplorer/iprojectproperties.h @@ -45,12 +45,6 @@ namespace Constants { class PROJECTEXPLORER_EXPORT IPropertiesPanel { public: - enum PanelFlag { - NoFlag = 0x00, - NoLeftMargin = 0x01 - }; - Q_DECLARE_FLAGS(PanelFlags, PanelFlag) - IPropertiesPanel() { } virtual ~IPropertiesPanel() @@ -59,7 +53,6 @@ public: virtual QString displayName() const = 0; virtual QIcon icon() const = 0; virtual QWidget *widget() const = 0; - virtual PanelFlags flags() const { return NoFlag; } }; class PROJECTEXPLORER_EXPORT IPanelFactory : public QObject diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index ab7476226de74a9dd7eebf50c2a6b968c0b85210..e1c15fc339179855357fdc911c76fde362df6944 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -210,9 +210,7 @@ void PanelsWidget::addPropertiesPanel(IPropertiesPanel *panel) void PanelsWidget::addPanelWidget(IPropertiesPanel *panel, int row) { QWidget *widget = panel->widget(); - int leftMargin = (panel->flags() & IPropertiesPanel::NoLeftMargin) - ? 0 : Constants::PANEL_LEFT_MARGIN; - widget->setContentsMargins(leftMargin, + widget->setContentsMargins(Constants::PANEL_LEFT_MARGIN, ABOVE_CONTENTS_MARGIN, 0, BELOW_CONTENTS_MARGIN); widget->setParent(m_root);