From 8ce0d366d0c0b7fbc629ebf0227a3ed155f91d5c Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Tue, 3 Oct 2023 10:36:09 +0200 Subject: [PATCH] Show effect name as title of dialog Add the effect name as the title in the content of the window. This improves the structure of the dialog as it is now clearer from the content itself to which effect the controls belong to. This duplicates the information from the window title. However, the window title is rather small and the larger font in the content makes it easier to find an effect in a set of opened dialogs. --- data/themes/classic/style.css | 6 ++++++ data/themes/default/style.css | 6 ++++++ plugins/LadspaEffect/LadspaMatrixControlDialog.cpp | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/data/themes/classic/style.css b/data/themes/classic/style.css index cf224a74b..d9fa8491f 100644 --- a/data/themes/classic/style.css +++ b/data/themes/classic/style.css @@ -467,6 +467,12 @@ lmms--gui--EffectControlDialog QGroupBox::title { padding: 2px 1px; } +lmms--gui--LadspaMatrixControlDialog QLabel#ladspaheader { + font-size: 14pt; + font-weight: bold; + qproperty-alignment: AlignCenter; +} + /* main toolbar */ QWidget#mainToolbar { diff --git a/data/themes/default/style.css b/data/themes/default/style.css index 8ead9062d..d17937d88 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -490,6 +490,12 @@ lmms--gui--EffectControlDialog QGroupBox::title { padding: 2px 1px; } +lmms--gui--LadspaMatrixControlDialog QLabel#ladspaheader { + font-size: 14pt; + font-weight: bold; + qproperty-alignment: AlignCenter; +} + /* main toolbar */ QWidget#mainToolbar { diff --git a/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp b/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp index 88810cee6..666edc218 100644 --- a/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp +++ b/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp @@ -55,6 +55,10 @@ LadspaMatrixControlDialog::LadspaMatrixControlDialog(LadspaControls * ladspaCont { QVBoxLayout * mainLayout = new QVBoxLayout(this); + QLabel * label = new QLabel(ladspaControls->effect()->displayName(), this); + label->setObjectName("ladspaheader"); + mainLayout->addWidget(label); + m_scrollArea = new QScrollArea(this); m_scrollArea->setWidgetResizable(true); m_scrollArea->setFrameShape(QFrame::NoFrame);