From 6d4945e411f1c645fcc50e791b4499a2963a82bb Mon Sep 17 00:00:00 2001
From: Ludwig Jaeck <ludwig.jaeck@outlook.de>
Date: Thu, 19 Jan 2023 08:59:01 +0100
Subject: [PATCH] Removed not needed stylesheet properties

---
 GUI/View/Fit/MinimizerSettingsWidget.cpp              | 2 --
 GUI/View/Import/RealDataSelectorWidget.cpp            | 3 ---
 GUI/View/Instrument/AxisPropertyEditor.cpp            | 1 -
 GUI/View/Instrument/DistributionEditor.cpp            | 1 -
 GUI/View/Instrument/FootprintCorrectionEditor.cpp     | 1 -
 GUI/View/Instrument/InclinationAnglesEditor.cpp       | 2 --
 GUI/View/Instrument/InstrumentLibraryEditor.cpp       | 5 -----
 GUI/View/Instrument/InstrumentView.cpp                | 6 ------
 GUI/View/Instrument/RectangularDetectorEditor.cpp     | 2 --
 GUI/View/Instrument/ResolutionFunctionEditor.cpp      | 1 -
 GUI/View/Mask/MaskEditorPropertyPanel.cpp             | 2 --
 GUI/View/PlotUtil/DataPropertyWidget.cpp              | 2 --
 GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp | 4 ----
 GUI/View/Tool/GroupBoxCollapser.cpp                   | 1 -
 GUI/View/Toplevel/SimulationView.cpp                  | 3 ---
 GUI/View/Toplevel/WelcomeView.cpp                     | 3 ---
 16 files changed, 39 deletions(-)

diff --git a/GUI/View/Fit/MinimizerSettingsWidget.cpp b/GUI/View/Fit/MinimizerSettingsWidget.cpp
index 9f1e44dff26..ec635f0f916 100644
--- a/GUI/View/Fit/MinimizerSettingsWidget.cpp
+++ b/GUI/View/Fit/MinimizerSettingsWidget.cpp
@@ -31,8 +31,6 @@ MinimizerSettingsWidget::MinimizerSettingsWidget(QWidget* parent)
     , m_containerItem(nullptr)
 {
     setWindowTitle(QLatin1String("Minimizer Settings"));
-    setAttribute(Qt::WA_StyledBackground, true);
-    setProperty("stylable", true); // for stylesheet addressing
 
     m_mainLayout = new QFormLayout(this);
     m_mainLayout->setContentsMargins(8, 8, 8, 8);
diff --git a/GUI/View/Import/RealDataSelectorWidget.cpp b/GUI/View/Import/RealDataSelectorWidget.cpp
index fe324de53db..5e860a93fad 100644
--- a/GUI/View/Import/RealDataSelectorWidget.cpp
+++ b/GUI/View/Import/RealDataSelectorWidget.cpp
@@ -47,9 +47,6 @@ RealDataSelectorWidget::RealDataSelectorWidget(QWidget* parent, ProjectDocument*
     , m_renameDataAction(new QAction(this))
     , m_removeDataAction(new QAction(this))
 {
-    setProperty("stylable", true);
-    setAttribute(Qt::WA_StyledBackground, true);
-
     setMinimumSize(250, 600);
     setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
     setWindowTitle("RealDataSelectorWidget");
diff --git a/GUI/View/Instrument/AxisPropertyEditor.cpp b/GUI/View/Instrument/AxisPropertyEditor.cpp
index 9641a838f30..97249a6fb02 100644
--- a/GUI/View/Instrument/AxisPropertyEditor.cpp
+++ b/GUI/View/Instrument/AxisPropertyEditor.cpp
@@ -27,7 +27,6 @@ AxisPropertyEditor::AxisPropertyEditor(QWidget* parent, const QString& groupTitl
     : QGroupBox(groupTitle, parent)
     , m_axisProperty(axisProperty)
 {
-    setProperty("subgroup", true); // for stylesheet addressing
     auto* formLayout = new QFormLayout(this);
     formLayout->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
 
diff --git a/GUI/View/Instrument/DistributionEditor.cpp b/GUI/View/Instrument/DistributionEditor.cpp
index a163c26d2e7..9ce07aefb87 100644
--- a/GUI/View/Instrument/DistributionEditor.cpp
+++ b/GUI/View/Instrument/DistributionEditor.cpp
@@ -170,7 +170,6 @@ DistributionEditor::DistributionEditor(const QString& title,
                                        BeamDistributionItem* item)
     : QGroupBox(title, parent)
 {
-    setProperty("subgroup", true); // for stylesheet addressing
     auto* hLayout = new QHBoxLayout(this);
     m_selector = new DistributionSelector(mean_config, distributions, this, item);
     hLayout->addWidget(m_selector);
diff --git a/GUI/View/Instrument/FootprintCorrectionEditor.cpp b/GUI/View/Instrument/FootprintCorrectionEditor.cpp
index a11d678b42a..db410ac6d5f 100644
--- a/GUI/View/Instrument/FootprintCorrectionEditor.cpp
+++ b/GUI/View/Instrument/FootprintCorrectionEditor.cpp
@@ -25,7 +25,6 @@ FootprintCorrectionEditor::FootprintCorrectionEditor(QWidget* parent, ScanItem*
     , m_item(item)
 {
     ASSERT(item);
-    setProperty("subgroup", true); // for stylesheet addressing
     m_formLayout = new QFormLayout(this);
     m_formLayout->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
     auto* typeCombo = GUI::Util::createComboBoxFromProperty(item->footprintSelection(), [=](int) {
diff --git a/GUI/View/Instrument/InclinationAnglesEditor.cpp b/GUI/View/Instrument/InclinationAnglesEditor.cpp
index 41e0f47d987..29e0529bd5f 100644
--- a/GUI/View/Instrument/InclinationAnglesEditor.cpp
+++ b/GUI/View/Instrument/InclinationAnglesEditor.cpp
@@ -27,8 +27,6 @@ InclinationAnglesEditor::InclinationAnglesEditor(QWidget* parent, SpecularBeamIn
     : QGroupBox("Inclination angles [deg]", parent)
     , m_item(item)
 {
-    setProperty("subgroup", true); // for stylesheet addressing
-
     auto* hLayout = new QHBoxLayout(this);
     hLayout->setSpacing(50);
     auto* gform = new QFormLayout;
diff --git a/GUI/View/Instrument/InstrumentLibraryEditor.cpp b/GUI/View/Instrument/InstrumentLibraryEditor.cpp
index 17248f3ec40..702be5c3c9c 100644
--- a/GUI/View/Instrument/InstrumentLibraryEditor.cpp
+++ b/GUI/View/Instrument/InstrumentLibraryEditor.cpp
@@ -43,8 +43,6 @@ InstrumentLibraryEditor::InstrumentLibraryEditor(QWidget* parent,
 {
     m_ui->setupUi(this);
 
-    setAttribute(Qt::WA_StyledBackground, true);
-    setProperty("stylable", true); // for stylesheet addressing
     setWindowIcon(QIcon(":/images/library.svg"));
     setWindowFlag(Qt::WindowContextHelpButtonHint, false);
 
@@ -191,9 +189,6 @@ void InstrumentLibraryEditor::createWidgetsForCurrentInstrument()
     QWidget* w = new QWidget(m_ui->scrollArea);
     auto* layout = new QVBoxLayout(w);
 
-    w->setAttribute(Qt::WA_StyledBackground, true);
-    w->setProperty("stylable", true); // for stylesheet addressing
-
     auto* g = new QGroupBox(m_ui->scrollArea);
     g->setTitle(QString("Information (%1 instrument)").arg(currentInstrument->instrumentType()));
 
diff --git a/GUI/View/Instrument/InstrumentView.cpp b/GUI/View/Instrument/InstrumentView.cpp
index 560e4d832b3..2f1171787b1 100644
--- a/GUI/View/Instrument/InstrumentView.cpp
+++ b/GUI/View/Instrument/InstrumentView.cpp
@@ -40,9 +40,6 @@ InstrumentView::InstrumentView(QWidget* parent, ProjectDocument* document)
     : QWidget(parent)
     , m_document(document)
 {
-    setAttribute(Qt::WA_StyledBackground, true);
-    setProperty("stylable", true); // for stylesheet addressing
-
     auto* horizontalLayout = new QHBoxLayout;
     m_instrumentListView = new InstrumentListView(document, this);
     horizontalLayout->addWidget(m_instrumentListView);
@@ -101,9 +98,6 @@ void InstrumentView::createWidgetsForCurrentInstrument()
     QWidget* w = new QWidget(m_scrollArea);
     auto* layout = new QVBoxLayout(w);
 
-    w->setAttribute(Qt::WA_StyledBackground, true);
-    w->setProperty("stylable", true); // for stylesheet addressing
-
     auto* g = new QGroupBox(m_scrollArea);
     g->setTitle(QString("Information (%1 instrument)").arg(currentInstrument->instrumentType()));
     g->setMaximumHeight(200);
diff --git a/GUI/View/Instrument/RectangularDetectorEditor.cpp b/GUI/View/Instrument/RectangularDetectorEditor.cpp
index f1eac77afd8..4411a7358bc 100644
--- a/GUI/View/Instrument/RectangularDetectorEditor.cpp
+++ b/GUI/View/Instrument/RectangularDetectorEditor.cpp
@@ -39,7 +39,6 @@ RectangularDetectorEditor::RectangularDetectorEditor(QWidget* parent,
 
     // -- x-axis controls
     auto* xAxisGroupBox = new QGroupBox("X axis", this);
-    xAxisGroupBox->setProperty("subgroup", true); // for stylesheet addressing
     auto* xAxisFormLayout = new QFormLayout(xAxisGroupBox);
 
     auto* xAxisNbinsSpinBox = new SafeSpinBox;
@@ -69,7 +68,6 @@ RectangularDetectorEditor::RectangularDetectorEditor(QWidget* parent,
 
     // -- y-axis controls
     auto* yAxisGroupBox = new QGroupBox("Y axis", this);
-    yAxisGroupBox->setProperty("subgroup", true); // for stylesheet addressing
     auto* yAxisFormLayout = new QFormLayout(yAxisGroupBox);
 
     auto* yAxisNbinsSpinBox = new SafeSpinBox;
diff --git a/GUI/View/Instrument/ResolutionFunctionEditor.cpp b/GUI/View/Instrument/ResolutionFunctionEditor.cpp
index e50761385cb..e69cd6f92a1 100644
--- a/GUI/View/Instrument/ResolutionFunctionEditor.cpp
+++ b/GUI/View/Instrument/ResolutionFunctionEditor.cpp
@@ -27,7 +27,6 @@ ResolutionFunctionEditor::ResolutionFunctionEditor(Unit unit, QWidget* parent, D
     , m_item(item)
 {
     ASSERT(item);
-    setProperty("subgroup", true); // for stylesheet addressing
     m_formLayout = new QFormLayout(this);
     m_formLayout->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
 
diff --git a/GUI/View/Mask/MaskEditorPropertyPanel.cpp b/GUI/View/Mask/MaskEditorPropertyPanel.cpp
index 79d71c18bfd..6386d5c6363 100644
--- a/GUI/View/Mask/MaskEditorPropertyPanel.cpp
+++ b/GUI/View/Mask/MaskEditorPropertyPanel.cpp
@@ -41,8 +41,6 @@ MaskEditorPropertyPanel::MaskEditorPropertyPanel(QWidget* parent)
 {
     setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
     setObjectName(QLatin1String("MaskEditorToolPanel"));
-    setAttribute(Qt::WA_StyledBackground, true);
-    setProperty("stylable", true); // for stylesheet addressing
 
     m_listView->setContextMenuPolicy(Qt::CustomContextMenu);
     connect(m_listView, &QListView::customContextMenuRequested, this,
diff --git a/GUI/View/PlotUtil/DataPropertyWidget.cpp b/GUI/View/PlotUtil/DataPropertyWidget.cpp
index 319118a8cd7..b497ce325dc 100644
--- a/GUI/View/PlotUtil/DataPropertyWidget.cpp
+++ b/GUI/View/PlotUtil/DataPropertyWidget.cpp
@@ -21,8 +21,6 @@ DataPropertyWidget::DataPropertyWidget(QWidget* parent)
     : DataAccessWidget(parent)
 {
     setWindowTitle("Properties");
-    setAttribute(Qt::WA_StyledBackground, true);
-    setProperty("stylable", true); // for stylesheet addressing
 
     m_mainLayout = new QFormLayout(this);
     m_mainLayout->setContentsMargins(8, 20, 8, 8);
diff --git a/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp b/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp
index 1db7546513c..25e11463cdd 100644
--- a/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp
+++ b/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp
@@ -35,9 +35,6 @@ LayerOrientedSampleEditor::LayerOrientedSampleEditor(QWidget* parent, ProjectDoc
     , m_currentSample(nullptr)
     , m_document(document)
 {
-    setAttribute(Qt::WA_StyledBackground, true);
-    setProperty("stylable", true); // for stylesheet addressing
-
     m_scrollArea = new QScrollArea(this);
     m_scrollArea->setWidgetResizable(true);
     m_scrollArea->setWidget(createEmptyWidget());
@@ -180,7 +177,6 @@ void LayerOrientedSampleEditor::createLayerColors() // #baLayerEditor move to be
 QWidget* LayerOrientedSampleEditor::createEmptyWidget()
 {
     auto* emptyWidget = new QWidget(this);
-    emptyWidget->setProperty("stylable", true); // for stylesheet addressing
 
     auto* btn = new QPushButton("Create sample", emptyWidget);
     connect(btn, &QPushButton::clicked, this, &LayerOrientedSampleEditor::requestCreateNewSample);
diff --git a/GUI/View/Tool/GroupBoxCollapser.cpp b/GUI/View/Tool/GroupBoxCollapser.cpp
index f44e72c433c..c2159d892a1 100644
--- a/GUI/View/Tool/GroupBoxCollapser.cpp
+++ b/GUI/View/Tool/GroupBoxCollapser.cpp
@@ -115,7 +115,6 @@ GroupBoxCollapser::GroupBoxCollapser(QGroupBox* groupBox)
 
     groupBox->layout()->setMenuBar(m_titleWidget);
     groupBox->setTitle("");
-    groupBox->setProperty("collapsible", true); // helps to distinguish GroupBoxes in stylesheets
 
     connect(m_toggleButton, &QAbstractButton::clicked, this, &GroupBoxCollapser::toggle,
             Qt::UniqueConnection);
diff --git a/GUI/View/Toplevel/SimulationView.cpp b/GUI/View/Toplevel/SimulationView.cpp
index 5ab15c0abd3..54e2462b571 100644
--- a/GUI/View/Toplevel/SimulationView.cpp
+++ b/GUI/View/Toplevel/SimulationView.cpp
@@ -38,9 +38,6 @@ SimulationView::SimulationView(QWidget* parent, ProjectDocument* document)
 {
     m_ui->setupUi(this);
 
-    setAttribute(Qt::WA_StyledBackground, true);
-    setProperty("stylable", true); // for stylesheet addressing
-
     GroupBoxCollapser::installIntoGroupBox(m_ui->groupBox_3);
     GroupBoxCollapser::installIntoGroupBox(m_ui->groupBox_2);
     GroupBoxCollapser::installIntoGroupBox(m_ui->groupBox);
diff --git a/GUI/View/Toplevel/WelcomeView.cpp b/GUI/View/Toplevel/WelcomeView.cpp
index 72d70434c22..ec2c48b88dd 100644
--- a/GUI/View/Toplevel/WelcomeView.cpp
+++ b/GUI/View/Toplevel/WelcomeView.cpp
@@ -30,9 +30,6 @@ WelcomeView::WelcomeView(QWidget* parent)
 {
     m_ui->setupUi(this);
 
-    setAttribute(Qt::WA_StyledBackground, true);
-    setProperty("stylable", true); // for stylesheet addressing
-
     GroupBoxCollapser::installIntoGroupBox(m_ui->groupBox_2);
 
     QPalette palette = this->palette();
-- 
GitLab