From 696de11d1a27ce44ef37723bfa009ee62061c95d Mon Sep 17 00:00:00 2001
From: Mikhail Svechnikov <svechnikovmv@gmail.com>
Date: Wed, 30 Oct 2024 15:07:04 +0100
Subject: [PATCH] adjust instrument layout

---
 GUI/View/Device/ScanEditor.cpp                     | 1 +
 GUI/View/Instrument/DepthprobeInstrumentEditor.cpp | 2 +-
 GUI/View/Instrument/OffspecInstrumentEditor.cpp    | 2 +-
 GUI/View/Instrument/SpecularInstrumentEditor.cpp   | 2 +-
 GUI/View/View/InstrumentView.cpp                   | 2 +-
 5 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/GUI/View/Device/ScanEditor.cpp b/GUI/View/Device/ScanEditor.cpp
index dc7625359bb..18da11ad66b 100644
--- a/GUI/View/Device/ScanEditor.cpp
+++ b/GUI/View/Device/ScanEditor.cpp
@@ -32,6 +32,7 @@ ScanEditor::ScanEditor(QWidget* parent, InstrumentItem* instr_item, ScanItem* it
     : CollapsibleGroupBox("Beam and scan parameters", parent, item->expandBeamParameters)
 {
     auto* layout = new QGridLayout(body());
+    layout->setAlignment(Qt::AlignTop);
 
     //... Intensity
 
diff --git a/GUI/View/Instrument/DepthprobeInstrumentEditor.cpp b/GUI/View/Instrument/DepthprobeInstrumentEditor.cpp
index d5abc93e5ed..00bf797a496 100644
--- a/GUI/View/Instrument/DepthprobeInstrumentEditor.cpp
+++ b/GUI/View/Instrument/DepthprobeInstrumentEditor.cpp
@@ -32,7 +32,7 @@ DepthprobeInstrumentEditor::DepthprobeInstrumentEditor(DepthprobeInstrumentItem*
                                          "Number of points in scan across sample bulk");
     layout->addWidget(depthAxisEditor);
 
-    layout->addStretch();
+    layout->addStretch(1);
 
     connect(scanEditor, &ScanEditor::dataChanged, this, &IComponentEditor::dataChanged);
     connect(depthAxisEditor, &AxisForm::dataChanged, this, &IComponentEditor::dataChanged);
diff --git a/GUI/View/Instrument/OffspecInstrumentEditor.cpp b/GUI/View/Instrument/OffspecInstrumentEditor.cpp
index 09a3b07d94f..15777691e8e 100644
--- a/GUI/View/Instrument/OffspecInstrumentEditor.cpp
+++ b/GUI/View/Instrument/OffspecInstrumentEditor.cpp
@@ -34,7 +34,7 @@ OffspecInstrumentEditor::OffspecInstrumentEditor(OffspecInstrumentItem* instrume
     auto* polMatricesAnalysisEditor = new PolarizationAnalysisEditor(this, instrument);
     layout->addWidget(polMatricesAnalysisEditor);
 
-    layout->addStretch();
+    layout->addStretch(1);
 
     connect(scanEditor, &ScanEditor::dataChanged, this, &IComponentEditor::dataChanged);
     connect(detectorEditor, &OffspecDetectorEditor::dataChanged, this,
diff --git a/GUI/View/Instrument/SpecularInstrumentEditor.cpp b/GUI/View/Instrument/SpecularInstrumentEditor.cpp
index dfdc8bae677..3cd249f3d96 100644
--- a/GUI/View/Instrument/SpecularInstrumentEditor.cpp
+++ b/GUI/View/Instrument/SpecularInstrumentEditor.cpp
@@ -34,7 +34,7 @@ SpecularInstrumentEditor::SpecularInstrumentEditor(SpecularInstrumentItem* instr
     auto* backgroundForm = new BackgroundForm(this, instrument);
     layout->addWidget(backgroundForm);
 
-    layout->addStretch();
+    layout->addStretch(1);
 
     connect(scanEditor, &ScanEditor::dataChanged, this, &IComponentEditor::dataChanged);
     connect(polMatricesAnalysisEditor, &PolarizationAnalysisEditor::dataChanged, this,
diff --git a/GUI/View/View/InstrumentView.cpp b/GUI/View/View/InstrumentView.cpp
index bcf429cccf1..82037fe050b 100644
--- a/GUI/View/View/InstrumentView.cpp
+++ b/GUI/View/View/InstrumentView.cpp
@@ -60,7 +60,7 @@ InstrumentView::InstrumentView()
 
     hLayout->addWidget(m_scroll_area);
     m_scroll_area->setWidgetResizable(true);
-    m_scroll_area->setMinimumWidth(1000);
+    m_scroll_area->setMinimumWidth(950);
     m_scroll_area->setWidget(new QWidget(m_scroll_area)); // initial state: blank widget
 
     hLayout->addStretch(1);
-- 
GitLab