From 684f29d15c18598305e031567326a32094936239 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sun, 16 Jul 2023 15:28:33 +0200 Subject: [PATCH] Layout optimizations Set the vertical scroll bar to always show so that the controls do not move around if the scroll bar is hidden or shown. Set the margin of the grid layout to 0 so that the whole dialog becomes tighter. --- plugins/LadspaEffect/LadspaMatrixControlDialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp b/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp index d3015634a..1ce1de53b 100644 --- a/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp +++ b/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp @@ -55,6 +55,9 @@ LadspaMatrixControlDialog::LadspaMatrixControlDialog(LadspaControls * ladspaCont m_scrollArea = new QScrollArea(this); m_scrollArea->setWidgetResizable(true); m_scrollArea->setFrameShape(QFrame::NoFrame); + // Set to always on so that the elements do not move around when the + // scroll bar is hidden or shown. + m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); // Add a scroll area that grows mainLayout->addWidget(m_scrollArea, 1); @@ -174,6 +177,7 @@ QWidget * LadspaMatrixControlDialog::createMatrixWidget() { QWidget *widget = new QWidget(this); QGridLayout *gridLayout = new QGridLayout(widget); + gridLayout->setMargin(0); widget->setLayout(gridLayout); arrangeControls(widget, gridLayout);