Use vector assets for Dispersion plugin (#7773)

This commit is contained in:
Fawn
2025-06-15 20:23:52 -06:00
committed by GitHub
parent 76dddd8c66
commit 2806a31e4c
8 changed files with 43 additions and 26 deletions

View File

@@ -1,3 +1,3 @@
INCLUDE(BuildPlugin)
BUILD_PLUGIN(dispersion Dispersion.cpp DispersionControls.cpp DispersionControlDialog.cpp MOCFILES DispersionControls.h DispersionControlDialog.h EMBEDDED_RESOURCES *.png)
BUILD_PLUGIN(dispersion Dispersion.cpp DispersionControls.cpp DispersionControlDialog.cpp MOCFILES DispersionControls.h DispersionControlDialog.h EMBEDDED_RESOURCES logo.svg)

View File

@@ -24,14 +24,14 @@
#include "DispersionControlDialog.h"
#include "DispersionControls.h"
#include <QHBoxLayout>
#include "AutomatableButton.h"
#include "DispersionControls.h"
#include "embed.h"
#include "Knob.h"
#include "LcdSpinBox.h"
#include "PixmapButton.h"
#include <QHBoxLayout>
namespace lmms::gui
@@ -42,40 +42,36 @@ DispersionControlDialog::DispersionControlDialog(DispersionControls* controls) :
EffectControlDialog(controls)
{
setAutoFillBackground(true);
QPalette pal;
pal.setBrush(backgroundRole(), PLUGIN_NAME::getIconPixmap("artwork"));
setPalette(pal);
auto layout = new QHBoxLayout(this);
layout->setSpacing(5);
LcdSpinBox * m_amountBox = new LcdSpinBox(3, this, "Amount");
m_amountBox->setModel(&controls->m_amountModel);
m_amountBox->setLabel(tr("AMOUNT"));
m_amountBox->setToolTip(tr("Number of all-pass filters"));
auto amountBox = new LcdSpinBox(3, this, "Amount");
amountBox->setModel(&controls->m_amountModel);
amountBox->setLabel(tr("AMOUNT"));
amountBox->setToolTip(tr("Number of all-pass filters"));
layout->addWidget(amountBox);
Knob * freqKnob = new Knob(KnobType::Bright26, tr("FREQ"), this);
auto freqKnob = new Knob(KnobType::Bright26, tr("FREQ"), this);
freqKnob->setModel(&controls->m_freqModel);
freqKnob->setHintText(tr("Frequency:") , " Hz");
freqKnob->setHintText(tr("Frequency:") , tr("Hz"));
layout->addWidget(freqKnob);
Knob * resoKnob = new Knob(KnobType::Bright26, tr("RESO"), this);
auto resoKnob = new Knob(KnobType::Bright26, tr("RESO"), this);
resoKnob->setModel(&controls->m_resoModel);
resoKnob->setHintText(tr("Resonance:") , " octaves");
resoKnob->setHintText(tr("Resonance:") , tr("octaves"));
layout->addWidget(resoKnob);
Knob * feedbackKnob = new Knob(KnobType::Bright26, tr("FEED"), this);
auto feedbackKnob = new Knob(KnobType::Bright26, tr("FEED"), this);
feedbackKnob->setModel(&controls->m_feedbackModel);
feedbackKnob->setHintText(tr("Feedback:") , "");
layout->addWidget(feedbackKnob);
PixmapButton * dcButton = new PixmapButton(this, tr("DC Offset Removal"));
dcButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("dc_active"));
dcButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("dc_inactive"));
auto dcButton = new AutomatableButton(this, tr("DC Offset Removal"));
dcButton->setCheckable(true);
dcButton->setText(tr("DC"));
dcButton->setModel(&controls->m_dcModel);
dcButton->setToolTip(tr("Remove DC Offset"));
layout->addWidget(m_amountBox);
layout->addWidget(freqKnob);
layout->addWidget(resoKnob);
layout->addWidget(feedbackKnob);
dcButton->setObjectName("btn");
layout->addWidget(dcButton);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="48" height="48">
<path fill="#fff" d="M7.86719 2C3.95608 2 2 3.95608 2 7.86719V40.1328C2 44.04392 3.95608 46 7.86719 46H40.1328C44.04392 46 46 44.04392 46 40.13281V7.8672C46 3.95608 44.04392 2 40.13281 2H7.8672zM24 9l15 8.4375V35.25l-5.625 2.8125L27.75 35.25v-6.5625l5.625-2.8125V20.25L24 15.5625 14.625 20.25v5.625l5.625 2.8125V35.25l-5.625 2.8125L9 35.25V17.4375L24 9z"/>
</svg>

After

Width:  |  Height:  |  Size: 451 B