Upgrade Stereo Matrix plugin assets to SVG (#7803)

Upgrade Stereo Matrix plugin assets to SVG
* Use QHBoxLayout for StereoMatrix
This commit is contained in:
Fawn
2025-04-05 20:45:40 -06:00
committed by GitHub
parent 2482842daa
commit 17215343e4
6 changed files with 55 additions and 30 deletions

View File

@@ -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)

View File

@@ -23,10 +23,9 @@
*/
#include "StereoMatrixControlDialog.h"
#include <QHBoxLayout>
#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:"));
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,29 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" width="160" height="185">
<defs>
<linearGradient id="a">
<stop offset="0" stop-color="#08090c"/>
<stop offset="1" stop-color="#101116"/>
</linearGradient>
<linearGradient xlink:href="#a" id="c" x1="80" x2="80" y1="185" y2="0" gradientUnits="userSpaceOnUse"/>
<linearGradient xlink:href="#a" id="b" x2="0" y1="185" gradientUnits="userSpaceOnUse"/>
</defs>
<path fill="#2c974f" d="M0 0h11.2v185H0zm37.2 0h11.2v185H37.2zm37.2 0h11.2v185H74.4zm37.2 0h11.2v185h-11.2zm37.2 0H160v185h-11.2z"/>
<path fill="url(#b)" d="M0 0h160v185H0z"/>
<g fill="none" stroke-linejoin="round" stroke-width="3">
<path stroke="#d40237" stroke-linecap="round" d="m98.6 129.7 37.2-37.2-37.2-37.2v37.2l-37.2 37.2"/>
<path stroke="#2784d5" stroke-linecap="round" d="M61.4 129.7 24.2 92.5l37.2-37.2v37.2l37.2 37.2"/>
<path stroke="#5a6776" d="M61 42.5C61 35 65.5463 36 73.55 36l6.2505-10.063L86.2096 36c7.9975 0 12.791-1 12.791 6.5"/>
</g>
<g stroke-linejoin="round" stroke-width="3">
<rect width="13" height="13" x="54.5" y="42.5" fill="#2784d5" stroke="#2784d5" stroke-linecap="round" rx="2.065" ry="2.065"/>
<rect width="13" height="13" x="92.5" y="42.5" fill="#d40237" stroke="#d40237" stroke-linecap="round" rx="2.065" ry="2.065"/>
<path fill="none" stroke="#5a6776" d="M61 142.5c0 7.5 4.5463 6.5 12.55 6.5l6.2505 10.063L86.2096 149c7.9975 0 12.791 1 12.791-6.5"/>
</g>
<g stroke-linecap="round" stroke-linejoin="round" stroke-width="3">
<rect width="13" height="13" x="54.5" y="129.5" fill="#2784d5" stroke="#2784d5" rx="2.065" ry="2.065"/>
<rect width="13" height="13" x="92.5" y="129.5" fill="#d40237" stroke="#d40237" rx="2.065" ry="2.065"/>
<path fill="#596675" stroke="#c18204" d="M61 49v0z" opacity=".1"/>
</g>
<path fill="#fff" d="M73.107 9.8379v9.5996h2.0391V9.8379H73.107zm4.1855 0v9.5996h2.0664v-6.4258l5.4004 6.4258h2.1328V9.8379h-2.0918v6.4004l-5.375-6.4004h-2.1328zm-21.094 34.355v9.6133h9.6016v-2.0801h-7.5332v-7.5332h-2.0684zm38 .0137v9.5859h2.0684V50.646l2.7402-.0059 2.6465 3.1523h2.1328v-.707l-2.0762-2.4531h.1016c.3644 0 .695-.0879.9882-.2656.3023-.1778.541-.4185.7188-.7207.1867-.3023.2812-.6308.2812-.9864v-2.4805c0-.3555-.0945-.684-.2812-.9863-.1778-.3022-.4165-.543-.7188-.7207-.2933-.1778-.6238-.2656-.9882-.2656h-7.6133zm2.0684 2.0664h5.4395v2.2793h-5.4395V46.273zm-40.068 84.92v9.6133h9.6016v-2.0801h-7.5332v-7.5332h-2.0684zm38 .0136v9.586h2.0684v-3.1466l2.7402-.0058 2.6465 3.1524h2.1328v-.707l-2.0762-2.4531h.1016c.3644 0 .695-.0879.9882-.2657.3023-.1777.541-.4184.7188-.7207.1867-.3022.2812-.6307.2812-.9863v-2.4805c0-.3556-.0945-.6841-.2812-.9863-.1778-.3022-.4165-.543-.7188-.7207-.2933-.1778-.6238-.2657-.9882-.2657h-7.6133zm2.0684 2.0664h5.4395v2.2793h-5.4395v-2.2793zm-30.908 32.289c-.3556 0-.6841.0879-.9863.2657-.3023.1777-.541.4185-.7188.7207-.1778.2933-.2676.6219-.2676.9863v5.6543c0 .3556.0898.6841.2676.9863s.4165.541.7188.7188c.3022.1778.6307.2676.9863.2676h5.6543c.3555 0 .6793-.0898.9727-.2676.3022-.1778.5429-.4165.7207-.7188.1866-.3022.2793-.6307.2793-.9863v-5.6543c0-.3644-.0927-.693-.2793-.9863a2.0007 2.0007 0 0 0-.7207-.7207c-.2934-.1778-.6171-.2657-.9727-.2657h-5.6543zm10.066 0v7.627c0 .3556.0898.6842.2676.9864s.4185.541.7207.7187c.3022.1778.6307.2676.9863.2676h5.6523c.3556 0 .6813-.0898.9746-.2676a1.99 1.99 0 0 0 .7188-.7187c.1866-.3022.2812-.6308.2812-.9864v-7.627H82.933v7.5195h-5.4395v-7.5195h-2.0684zm11.588 0v2.0801h3.7598v7.5195h2.0801v-7.5195h3.7598v-2.08h-9.5996zm-21.561 2.0801h5.4395v5.4394h-5.4395v-5.4394z"/>
<path fill="url(#c)" d="M24.199 79.5a13 13 0 0 0-13 13 13 13 0 0 0 13 13 13 13 0 0 0 13-13 13 13 0 0 0-13-13zm37.201 0a13 13 0 0 0-13 13 13 13 0 0 0 13 13 13 13 0 0 0 13-13 13 13 0 0 0-13-13zm37.199 0a13 13 0 0 0-13 13 13 13 0 0 0 13 13 13 13 0 0 0 13-13 13 13 0 0 0-13-13zm37.201 0a13 13 0 0 0-13 13 13 13 0 0 0 13 13 13 13 0 0 0 13-13 13 13 0 0 0-13-13z"/>
</svg>

After

Width:  |  Height:  |  Size: 3.9 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