diff --git a/plugins/StereoMatrix/CMakeLists.txt b/plugins/StereoMatrix/CMakeLists.txt index 4e6de02ca..2990f8ec8 100644 --- a/plugins/StereoMatrix/CMakeLists.txt +++ b/plugins/StereoMatrix/CMakeLists.txt @@ -1,4 +1,4 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(stereomatrix StereoMatrix.cpp StereoMatrixControls.cpp StereoMatrixControlDialog.cpp StereoMatrix.h StereoMatrixControls.h StereoMatrixControlDialog.h MOCFILES StereoMatrixControls.h StereoMatrixControlDialog.h EMBEDDED_RESOURCES artwork.png logo.png) +BUILD_PLUGIN(stereomatrix StereoMatrix.cpp StereoMatrixControls.cpp StereoMatrixControlDialog.cpp StereoMatrix.h StereoMatrixControls.h StereoMatrixControlDialog.h MOCFILES StereoMatrixControls.h StereoMatrixControlDialog.h EMBEDDED_RESOURCES artwork.svg logo.svg) diff --git a/plugins/StereoMatrix/StereoMatrixControlDialog.cpp b/plugins/StereoMatrix/StereoMatrixControlDialog.cpp index da9a3aa9e..1530a0d25 100644 --- a/plugins/StereoMatrix/StereoMatrixControlDialog.cpp +++ b/plugins/StereoMatrix/StereoMatrixControlDialog.cpp @@ -23,10 +23,9 @@ */ - - #include "StereoMatrixControlDialog.h" +#include #include "embed.h" #include "Knob.h" #include "StereoMatrixControls.h" @@ -35,38 +34,32 @@ namespace lmms::gui { -StereoMatrixControlDialog::StereoMatrixControlDialog( - StereoMatrixControls * _controls ) : - EffectControlDialog( _controls ) +StereoMatrixControlDialog::StereoMatrixControlDialog(StereoMatrixControls* controls) : + EffectControlDialog(controls) { - - setFixedSize( 160, 185 ); - - setAutoFillBackground( true ); QPalette pal; - pal.setBrush( backgroundRole(), - PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); + setAutoFillBackground(true); + setFixedSize(160, 185); + pal.setBrush(backgroundRole(), PLUGIN_NAME::getIconPixmap("artwork")); + setPalette(pal); - auto llKnob = new Knob(KnobType::Bright26, this); - llKnob->setModel( &_controls->m_llModel ); - llKnob->setHintText( tr( "Left to Left Vol:" ) , "" ); - llKnob->move( 10, 79 ); + auto layout = new QHBoxLayout(this); - auto lrKnob = new Knob(KnobType::Bright26, this); - lrKnob->setModel( &_controls->m_lrModel ); - lrKnob->setHintText( tr( "Left to Right Vol:" ) , "" ); - lrKnob->move( 48, 79 ); + const auto makeKnob = [this, layout]( + FloatModel *model, + const QString &txt_before + ) { + auto k = new Knob(KnobType::Bright26, this); + k->setModel(model); + k->setHintText(txt_before, ""); + layout->addWidget(k, 0, Qt::AlignHCenter); + return k; + }; - auto rlKnob = new Knob(KnobType::Bright26, this); - rlKnob->setModel( &_controls->m_rlModel ); - rlKnob->setHintText( tr( "Right to Left Vol:" ) , "" ); - rlKnob->move( 85, 79 ); - - auto rrKnob = new Knob(KnobType::Bright26, this); - rrKnob->setModel( &_controls->m_rrModel ); - rrKnob->setHintText( tr( "Right to Right Vol:" ) , "" ); - rrKnob->move( 123, 79 ); + makeKnob(&controls->m_llModel, tr("Left to Left Vol:")); + makeKnob(&controls->m_lrModel, tr("Left to Right Vol:")); + makeKnob(&controls->m_rlModel, tr("Right to Left Vol:")); + makeKnob(&controls->m_rrModel, tr("Right to Right Vol:")); } diff --git a/plugins/StereoMatrix/artwork.png b/plugins/StereoMatrix/artwork.png deleted file mode 100644 index f76567fd2..000000000 Binary files a/plugins/StereoMatrix/artwork.png and /dev/null differ diff --git a/plugins/StereoMatrix/artwork.svg b/plugins/StereoMatrix/artwork.svg new file mode 100644 index 000000000..b54fa8530 --- /dev/null +++ b/plugins/StereoMatrix/artwork.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/StereoMatrix/logo.png b/plugins/StereoMatrix/logo.png deleted file mode 100644 index 9340da708..000000000 Binary files a/plugins/StereoMatrix/logo.png and /dev/null differ diff --git a/plugins/StereoMatrix/logo.svg b/plugins/StereoMatrix/logo.svg new file mode 100644 index 000000000..7920fa6b0 --- /dev/null +++ b/plugins/StereoMatrix/logo.svg @@ -0,0 +1,3 @@ + + +