From da3b7a6c4acea0e19feb49e204e59c12295f90b4 Mon Sep 17 00:00:00 2001
From: Thomas Hartmann <Thomas.Hartmann@digia.com>
Date: Thu, 6 Nov 2014 14:16:29 +0100
Subject: [PATCH] Theming: Fix styling of TargetSettingsWidget

If using the flat style also the TargetSettingsWidget should be flat.

Change-Id: I16147c9868e3e949a4d9aa0fedf85358504bde9e
Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
---
 .../projectexplorer/targetsettingswidget.cpp       | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/plugins/projectexplorer/targetsettingswidget.cpp b/src/plugins/projectexplorer/targetsettingswidget.cpp
index 6ea3ceaeac5..5afbcd2eb89 100644
--- a/src/plugins/projectexplorer/targetsettingswidget.cpp
+++ b/src/plugins/projectexplorer/targetsettingswidget.cpp
@@ -31,6 +31,8 @@
 #include "targetsettingswidget.h"
 #include "ui_targetsettingswidget.h"
 
+#include <utils/theme/theme.h>
+
 #include <QPushButton>
 
 using namespace ProjectExplorer::Internal;
@@ -41,9 +43,15 @@ TargetSettingsWidget::TargetSettingsWidget(QWidget *parent) :
     m_targetSelector(new TargetSelector(this))
 {
     ui->setupUi(this);
-    ui->header->setStyleSheet(QLatin1String("QWidget#header {"
-        "border-image: url(:/projectexplorer/images/targetseparatorbackground.png) 43 0 0 0 repeat;"
-        "}"));
+
+    if (Utils::creatorTheme()->widgetStyle() == Utils::Theme::StyleFlat) {
+        ui->separator->setVisible(false);
+        ui->shadow->setVisible(false);
+    } else {
+        ui->header->setStyleSheet(QLatin1String("QWidget#header {"
+                                                "border-image: url(:/projectexplorer/images/targetseparatorbackground.png) 43 0 0 0 repeat;"
+                                                "}"));
+    }
 
     QHBoxLayout *headerLayout = new QHBoxLayout;
     headerLayout->setContentsMargins(5, 3, 0, 0);
-- 
GitLab