diff --git a/src/libs/utils/detailswidget.cpp b/src/libs/utils/detailswidget.cpp
index 1641d09995fb6baaccc6536d3c70dea36cf05776..00be0f70f263022a8f8c957cf362d7ebcca852d7 100644
--- a/src/libs/utils/detailswidget.cpp
+++ b/src/libs/utils/detailswidget.cpp
@@ -18,11 +18,19 @@ DetailsWidget::DetailsWidget(QWidget *parent)
       m_grid(new QGridLayout(this))
 
 {
+    m_grid->setContentsMargins(4, 3, 4, 3);
+
     m_summaryLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
     m_summaryLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
 
-    m_grid->addWidget(m_summaryLabel, 0, 0, 2, 0);
-    m_grid->addWidget(m_detailsButton, 1, 2);
+    m_grid->addWidget(m_summaryLabel, 0, 0);
+    m_grid->addWidget(m_detailsButton, 0, 2, 1, 1, Qt::AlignBottom);
+
+    m_dummyWidget = new QWidget(this);
+    m_dummyWidget->setMaximumHeight(4);
+    m_dummyWidget->setMaximumHeight(4);
+    m_dummyWidget->setVisible(false);
+    m_grid->addWidget(m_dummyWidget, 2, 0, 1, 1);
 
     connect(m_detailsButton, SIGNAL(clicked()),
             this, SLOT(detailsButtonClicked()));
@@ -77,8 +85,10 @@ void DetailsWidget::paintEvent(QPaintEvent *paintEvent)
 
 void DetailsWidget::detailsButtonClicked()
 {
+    bool visible = m_detailsButton->isToggled();
     if (m_widget)
-        m_widget->setVisible(m_detailsButton->isToggled());
+        m_widget->setVisible(visible);
+    m_dummyWidget->setVisible(visible);
     fixUpLayout();
 }
 
@@ -117,9 +127,11 @@ void DetailsWidget::setWidget(QWidget *widget)
         m_widget = 0;
     }
     if (widget) {
-        m_grid->addWidget(widget, 2, 0, 1, 3);
+        m_grid->addWidget(widget, 1, 0, 1, 3);
         m_widget = widget;
-        m_widget->setVisible(m_detailsButton->isToggled());
+        bool visible = m_detailsButton->isToggled();
+        m_widget->setVisible(visible);
+        m_dummyWidget->setVisible(visible);
     }
 }
 
@@ -132,7 +144,7 @@ void DetailsWidget::setToolWidget(QWidget *widget)
         m_toolWidget = 0;
     }
     if (widget) {
-        m_grid->addWidget(widget, 1, 1);
+        m_grid->addWidget(widget, 0, 1, 1, 1, Qt::AlignBottom);
         m_toolWidget = widget;
     }
 }
diff --git a/src/libs/utils/detailswidget.h b/src/libs/utils/detailswidget.h
index eee0444cb991302bed6edb1860a215535b5afb50..781fc4026edc53449126163c2ea79e96bb2903a8 100644
--- a/src/libs/utils/detailswidget.h
+++ b/src/libs/utils/detailswidget.h
@@ -47,6 +47,7 @@ private:
 
     QWidget *m_widget;
     QWidget *m_toolWidget;
+    QWidget *m_dummyWidget;
     QGridLayout *m_grid;
 };
 }
diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp
index e909d290ffb3f6690f622143a15bfea71ad8f1b1..ba645c942680a2ed5c20a03ee52670dc2f99b9f9 100644
--- a/src/plugins/projectexplorer/buildstepspage.cpp
+++ b/src/plugins/projectexplorer/buildstepspage.cpp
@@ -52,6 +52,7 @@ BuildStepsPage::BuildStepsPage(Project *project, bool clean) :
 {
     m_vbox = new QVBoxLayout(this);
     m_vbox->setContentsMargins(0, 0, 0, 0);
+    m_vbox->setSpacing(0);
     const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
     foreach (BuildStep *bs, steps) {
         addBuildStepWidget(-1, bs);
@@ -163,8 +164,12 @@ void BuildStepsPage::addBuildStepWidget(int pos, BuildStep *step)
 
     s.upButton = new QToolButton(this);
     s.upButton->setArrowType(Qt::UpArrow);
+    s.upButton->setMaximumHeight(22);
+    s.upButton->setMaximumWidth(22);
     s.downButton = new QToolButton(this);
     s.downButton->setArrowType(Qt::DownArrow);
+    s.downButton->setMaximumHeight(22);
+    s.downButton->setMaximumWidth(22);
 #ifdef Q_OS_MAC
     s.upButton->setIconSize(QSize(10, 10));
     s.downButton->setIconSize(QSize(10, 10));
@@ -174,6 +179,7 @@ void BuildStepsPage::addBuildStepWidget(int pos, BuildStep *step)
     toolWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
     s.hbox = new QHBoxLayout(toolWidget);
     s.hbox->setMargin(0);
+    s.hbox->setSpacing(0);
     s.hbox->addWidget(s.upButton);
     s.hbox->addWidget(s.downButton);
     s.detailsWidget->setToolWidget(toolWidget);
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index a3fe25fdd615dc0a9af665153000b8b4691b85bd..326b9ec3961acec693ae9dd3c23a1cb95662cdfe 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -104,7 +104,7 @@ void PanelsWidget::addWidget(QWidget *widget)
     p.panelWidget = widget;
 
     p.marginLayout = 0;
-    m_layout->insertWidget(m_layout->count() -1, widget);
+    m_layout->insertWidget(m_layout->count() - 1, widget);
     m_panels.append(p);
 }