From 2c619c767bdee51506c5a7d6af5aebf74d7a35b6 Mon Sep 17 00:00:00 2001
From: Joachim Wuttke <j.wuttke@fz-juelich.de>
Date: Tue, 31 Oct 2023 07:06:21 +0100
Subject: [PATCH 1/4] use StaticGrpBox as there is no flag to preserve
 collapsed state

---
 GUI/View/Mask/MaskEditorPropertyPanel.cpp | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/GUI/View/Mask/MaskEditorPropertyPanel.cpp b/GUI/View/Mask/MaskEditorPropertyPanel.cpp
index cd7fe77c973..6ac77e07748 100644
--- a/GUI/View/Mask/MaskEditorPropertyPanel.cpp
+++ b/GUI/View/Mask/MaskEditorPropertyPanel.cpp
@@ -22,7 +22,6 @@
 #include "GUI/View/Numeric/NumberUtil.h"
 #include "GUI/View/Widget/GroupBoxes.h"
 #include <QCheckBox>
-#include <QGroupBox>
 #include <QLineEdit>
 
 using std::function;
@@ -48,27 +47,24 @@ MaskEditorPropertyPanel::MaskEditorPropertyPanel(QWidget* parent)
     mainLayout->setSpacing(8);
 
     // -- plot properties
-    auto* plotPropertiesGroup = new QGroupBox("Plot properties", this);
+    auto* plotPropertiesGroup = new StaticGroupBox("Plot properties", this);
     auto* plotPropertiesLayout = new QVBoxLayout(plotPropertiesGroup);
     plotPropertiesLayout->setContentsMargins(0, 0, 0, 0);
     m_propertyPanel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
     plotPropertiesLayout->addWidget(m_propertyPanel);
-    GroupBoxCollapser::installIntoGroupBox(plotPropertiesGroup);
 
     // -- mask stack
-    auto* maskStackGroup = new QGroupBox("Mask stack", this);
+    auto* maskStackGroup = new StaticGroupBox("Mask stack", this);
     auto* maskStackLayout = new QVBoxLayout(maskStackGroup);
     maskStackLayout->setContentsMargins(0, 0, 0, 0);
     m_listView->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
     maskStackLayout->addWidget(m_listView);
-    GroupBoxCollapser::installIntoGroupBox(maskStackGroup);
 
     // -- mask properties
-    auto* maskPropertiesGroup = new QGroupBox("Mask properties", this);
+    auto* maskPropertiesGroup = new StaticGroupBox("Mask properties", this);
     maskPropertiesGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
     m_maskPropertiesLayout = new QFormLayout(maskPropertiesGroup);
     m_maskPropertiesLayout->setContentsMargins(8, 8, 8, 8);
-    GroupBoxCollapser::installIntoGroupBox(maskPropertiesGroup);
 
     mainLayout->addWidget(plotPropertiesGroup);
     mainLayout->addWidget(maskStackGroup);
-- 
GitLab


From 537b8eb8d2391c3f905a69d89515baa923d22262 Mon Sep 17 00:00:00 2001
From: Joachim Wuttke <j.wuttke@fz-juelich.de>
Date: Tue, 31 Oct 2023 07:10:19 +0100
Subject: [PATCH 2/4] rm fwd decls

---
 GUI/View/Instrument/InstrumentView.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/GUI/View/Instrument/InstrumentView.h b/GUI/View/Instrument/InstrumentView.h
index 1abf4aa5ae4..f2c539d229e 100644
--- a/GUI/View/Instrument/InstrumentView.h
+++ b/GUI/View/Instrument/InstrumentView.h
@@ -22,10 +22,8 @@ class InstrumentItem;
 class InstrumentListView;
 class ProjectDocument;
 class QCheckBox;
-class QLabel;
 class QMenu;
 class QScrollArea;
-class QWidgetAction;
 
 class InstrumentView : public QWidget {
     Q_OBJECT
-- 
GitLab


From bdbcb26aae6d475da8fbf856678832b93def61b1 Mon Sep 17 00:00:00 2001
From: Joachim Wuttke <j.wuttke@fz-juelich.de>
Date: Tue, 31 Oct 2023 07:12:43 +0100
Subject: [PATCH 3/4] rm includes

---
 GUI/View/Instrument/InstrumentView.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/GUI/View/Instrument/InstrumentView.cpp b/GUI/View/Instrument/InstrumentView.cpp
index a365f3515ad..8802fa13e2d 100644
--- a/GUI/View/Instrument/InstrumentView.cpp
+++ b/GUI/View/Instrument/InstrumentView.cpp
@@ -22,10 +22,8 @@
 #include "GUI/View/Widget/ApplicationSettings.h"
 #include "GUI/View/Widget/GroupBoxes.h"
 #include "GUI/View/Widget/StyledToolbar.h"
-#include <QAction>
 #include <QCheckBox>
 #include <QFormLayout>
-#include <QGroupBox>
 #include <QLineEdit>
 #include <QMenu>
 #include <QMessageBox>
-- 
GitLab


From a851eea0f228a5502f093fab8517b0b08d403b3c Mon Sep 17 00:00:00 2001
From: Joachim Wuttke <j.wuttke@fz-juelich.de>
Date: Tue, 31 Oct 2023 07:20:01 +0100
Subject: [PATCH 4/4] Sample summary: title of group; fixed height of
 description

---
 GUI/View/Instrument/InstrumentView.cpp | 2 +-
 GUI/View/SampleDesigner/SampleForm.cpp | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/GUI/View/Instrument/InstrumentView.cpp b/GUI/View/Instrument/InstrumentView.cpp
index 8802fa13e2d..2c012a69bf6 100644
--- a/GUI/View/Instrument/InstrumentView.cpp
+++ b/GUI/View/Instrument/InstrumentView.cpp
@@ -97,7 +97,7 @@ void InstrumentView::createWidgetsForCurrentInstrument()
 
     //... Groupbox with instrument name and description (same layout for all instrument types)
 
-    auto title = QString("Information (%1 instrument)").arg(currentInstrument->instrumentType());
+    auto title = QString("Summary (%1 instrument)").arg(currentInstrument->instrumentType());
     auto* g = new CollapsibleGroupBox(title, m_scrollArea, currentInstrument->expandInfo);
     g->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
     auto* formLayout = new QFormLayout;
diff --git a/GUI/View/SampleDesigner/SampleForm.cpp b/GUI/View/SampleDesigner/SampleForm.cpp
index 4d39a4b1644..7cd946c3f4b 100644
--- a/GUI/View/SampleDesigner/SampleForm.cpp
+++ b/GUI/View/SampleDesigner/SampleForm.cpp
@@ -58,7 +58,8 @@ public:
 
 
 SampleForm::SampleForm(QWidget* parent, SampleItem* sampleItem, SampleEditorController* ec)
-    : CollapsibleGroupBox("Sample", parent, sampleItem->expandInfo)
+    : CollapsibleGroupBox("Summary and layer-independent parameters", parent,
+                          sampleItem->expandInfo)
     , m_sampleItem(sampleItem)
     , m_ec(ec)
 {
@@ -77,7 +78,7 @@ SampleForm::SampleForm(QWidget* parent, SampleItem* sampleItem, SampleEditorCont
     auto* descriptionEdit = new QTextEdit;
     m_layout->addRow("Description:", descriptionEdit);
     descriptionEdit->setFixedWidth(585);
-    descriptionEdit->setMaximumHeight(100);
+    descriptionEdit->setFixedHeight(60);
     descriptionEdit->setAcceptRichText(false);
     descriptionEdit->setTabChangesFocus(true);
     descriptionEdit->setPlainText(sampleItem->description());
-- 
GitLab