Update mute and solo buttons, add them to instrument windows (#7708)
* Add mute and solo buttons to instrument windows * Change mute and solo buttons to optimized CC0 SVG assets * Icons provided by @StakeoutPunch, button backgrounds provided by @RebeccaDeField --------- Co-authored-by: Sotonye Atemie <sakertooth@gmail.com> Co-authored-by: Rebecca Noel Ati <contactme@rebeccadefield.com> Co-authored-by: Stakeout Punch <StakeoutPunch@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
INCLUDE(InstallHelpers)
|
||||
|
||||
INSTALL_DATA_SUBDIRS("themes" "*.png;*.css")
|
||||
|
||||
INSTALL_DATA_SUBDIRS("themes" "*.png;*.svg;*.css")
|
||||
|
||||
37
data/themes/default/mute_active.svg
Normal file
37
data/themes/default/mute_active.svg
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="20" height="20" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>LMMS mute button (active)</title>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS mute button (active)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect width="19" height="19" x=".5" y=".5" fill="#d40237"
|
||||
stroke="#890120" stroke-linecap="round" stroke-linejoin="bevel"
|
||||
ry="2.065" id="button" />
|
||||
<path id="highlight" fill="#fff" opacity=".1"
|
||||
d="M2.56445 1C1.6888 1 1 1.6888 1 2.56445V3c0-.554.446-1 1-1h16c.554 0 1 .446 1 1v-.43555C19 1.6888 18.3112 1 17.43555 1Z" />
|
||||
<path id="shadow" fill="#000" opacity=".1"
|
||||
d="M2.56445 19C1.6888 19 1 18.3112 1 17.43555V17c0 .554.446 1 1 1h16c.554 0 1-.446 1-1v.43555C19 18.3112 18.3112 19 17.43555 19Z" />
|
||||
<path id="speaker-cut" fill="#fff"
|
||||
d="m 5,4.0000001 -0.5,0.5 -0.5,0.5 1.95508,1.95508 L 10,11 l 1,1 1,1 1,1 1,1 1,1 0.5,-0.5 L 16,15 14.9336,13.9336 C 15.89052,12.66885 16.36719,11.34907 16.36719,10 16.36719,8.2666701 15.58249,6.5825001 14,5.0000001 l -1,1 c 1.4175,1.4175 2,2.73334 2,3.9999999 0,0.94192 -0.32225,1.9118 -1.07031,2.9297 L 12.94336,11.94336 C 13.42336,11.30872 13.70312,10.6884 13.70312,10 13.70312,8.9389001 13.04125,8.0412501 12,7.0000001 l -1,1 c 0.95875,0.95876 1.375,1.56111 1.375,1.9999999 0,0.2501 -0.13605,0.5534 -0.4297,0.94531 L 10,9.0000101 v -5 H 9.5 c -0.5,0 -0.5,0 -1,0.5 l -1.5,1.5 z m -1,3 c -0.5,0 -1,0.44021 -1,1 V 12 c 0,0.5 0.5,1 1,1 h 1.5 c 0.5,0 0.5,0 1,0.5 l 2,2 C 9,16 9,16 9.5,16 H 10 v -3 z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
37
data/themes/default/mute_inactive.svg
Normal file
37
data/themes/default/mute_inactive.svg
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="20" height="20" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>LMMS mute button (inactive)</title>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS mute button (inactive)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect width="19" height="19" x=".5" y=".5" fill="transparent"
|
||||
stroke="#000" stroke-linecap="round" stroke-linejoin="bevel"
|
||||
stroke-opacity="0.5" ry="2.065" id="button" />
|
||||
<path id="highlight" fill="#fff" opacity=".1"
|
||||
d="M2.56445 1C1.6888 1 1 1.6888 1 2.56445V3c0-.554.446-1 1-1h16c.554 0 1 .446 1 1v-.43555C19 1.6888 18.3112 1 17.43555 1Z" />
|
||||
<path id="shadow" fill="#000" opacity=".1"
|
||||
d="M2.56445 19C1.6888 19 1 18.3112 1 17.43555V17c0 .554.446 1 1 1h16c.554 0 1-.446 1-1v.43555C19 18.3112 18.3112 19 17.43555 19Z" />
|
||||
<path id="speaker" fill="#fff"
|
||||
d="m 9.3339845,4.0000002 c -0.341797,0.00684 -0.3964845,0.0625 -0.8339845,0.5 l -2,2 c -0.5,0.5 -0.5,0.5 -1,0.5 H 4 c -0.5,0 -1,0.440207 -1,1 V 12 c 0,0.5 0.5,1 1,1 h 1.5 c 0.5,0 0.5,0 1,0.5 l 2,2 C 9,16 9,16 9.5,16 H 10 V 4.0000002 H 9.5 c -0.0625,0 -0.1172,-9.765e-4 -0.1660155,0 z m 4.6660155,1 -1,1 C 14.417505,7.4175047 15,8.7333337 15,10 c 0,1.266665 -0.582495,2.582495 -2,4 l 1,1 c 1.582495,-1.582495 2.367188,-3.266665 2.367188,-5 0,-1.7333348 -0.784693,-3.4175038 -2.367188,-4.9999998 z m -2,2 -1,1 c 0.95875,0.958755 1.375,1.56111 1.375,1.9999998 0,0.4389 -0.41625,1.04125 -1.375,2 l 1,1 c 1.04125,-1.04125 1.703125,-1.938885 1.703125,-3 C 13.703125,8.9388902 13.04125,8.0412492 12,7.0000002 Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
37
data/themes/default/solo_active.svg
Normal file
37
data/themes/default/solo_active.svg
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="20" height="20" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>LMMS solo button (active)</title>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS solo button (active)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect width="19" height="19" x=".5" y=".5" fill="#2696d1"
|
||||
stroke="#055f89" stroke-linecap="round" stroke-linejoin="bevel"
|
||||
ry="2.065" id="button" />
|
||||
<path id="highlight" fill="#fff" opacity=".1"
|
||||
d="M2.56445 1C1.6888 1 1 1.6888 1 2.56445V3c0-.554.446-1 1-1h16c.554 0 1 .446 1 1v-.43555C19 1.6888 18.3112 1 17.43555 1Z" />
|
||||
<path id="shadow" fill="#000" opacity=".1"
|
||||
d="M2.56445 19C1.6888 19 1 18.3112 1 17.43555V17c0 .554.446 1 1 1h16c.554 0 1-.446 1-1v.43555C19 18.3112 18.3112 19 17.43555 19Z" />
|
||||
<path id="headphones" fill="#fff"
|
||||
d="m 10,4.0000248 c -1.472525,0.00403 -2.993968,0.4818935 -4.136604,1.5 C 4.72076,6.5181313 4,8.0872298 4,10.000025 c 0,1.60032 0,3.357065 0,5 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -3 c 0,-0.5 -0.5,-1 -1,-1 H 6 c 0,-0.5 0,-0.5 0,-1 0,-1.4114252 0.513729,-2.3474522 1.246094,-3.0000002 0.732364,-0.6525475 1.726429,-0.9971905 2.753906,-1 1.027475,-0.00281 2.03517,0.354394 2.765625,1.0039065 C 13.490632,7.6486008 13.992038,8.5905738 14,10.000025 v 1 h -1 c -0.5,0 -1,0.5 -1,1 v 3 c 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -5 C 15.992284,8.0891328 15.265582,6.5121893 14.127288,5.5000248 12.982744,4.4823023 11.472523,3.9959983 10,4.0000248 Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
37
data/themes/default/solo_inactive.svg
Normal file
37
data/themes/default/solo_inactive.svg
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="20" height="20" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>LMMS solo button (inactive)</title>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS solo button (inactive)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect width="19" height="19" x=".5" y=".5" fill="transparent"
|
||||
stroke="#000" stroke-linecap="round" stroke-linejoin="bevel"
|
||||
stroke-opacity="0.5" ry="2.065" id="button" />
|
||||
<path id="highlight" fill="#fff" opacity=".1"
|
||||
d="M2.56445 1C1.6888 1 1 1.6888 1 2.56445V3c0-.554.446-1 1-1h16c.554 0 1 .446 1 1v-.43555C19 1.6888 18.3112 1 17.43555 1Z" />
|
||||
<path id="shadow" fill="#000" opacity=".1"
|
||||
d="M2.56445 19C1.6888 19 1 18.3112 1 17.43555V17c0 .554.446 1 1 1h16c.554 0 1-.446 1-1v.43555C19 18.3112 18.3112 19 17.43555 19Z" />
|
||||
<path id="headphones" fill="#fff"
|
||||
d="m 10,4.0000248 c -1.472525,0.00403 -2.993968,0.4818935 -4.136604,1.5 C 4.72076,6.5181313 4,8.0872298 4,10.000025 c 0,1.60032 0,3.357065 0,5 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -3 c 0,-0.5 -0.5,-1 -1,-1 H 6 c 0,-0.5 0,-0.5 0,-1 0,-1.4114252 0.513729,-2.3474522 1.246094,-3.0000002 0.732364,-0.6525475 1.726429,-0.9971905 2.753906,-1 1.027475,-0.00281 2.03517,0.354394 2.765625,1.0039065 C 13.490632,7.6486008 13.992038,8.5905738 14,10.000025 v 1 h -1 c -0.5,0 -1,0.5 -1,1 v 3 c 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -5 C 15.992284,8.0891328 15.265582,6.5121893 14.127288,5.5000248 12.982744,4.4823023 11.472523,3.9959983 10,4.0000248 Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -28,6 +28,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "ModelView.h"
|
||||
#include "PixmapButton.h"
|
||||
#include "SerializingObject.h"
|
||||
#include "PluginView.h"
|
||||
|
||||
@@ -147,6 +148,8 @@ private:
|
||||
Knob * m_volumeKnob;
|
||||
Knob * m_panningKnob;
|
||||
Knob * m_pitchKnob;
|
||||
PixmapButton *m_muteBtn;
|
||||
PixmapButton *m_soloBtn;
|
||||
QLabel * m_pitchLabel;
|
||||
LcdSpinBox* m_pitchRangeSpinBox;
|
||||
QLabel * m_pitchRangeLabel;
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "ModelView.h"
|
||||
#include "PixmapButton.h"
|
||||
#include "SampleTrack.h"
|
||||
#include "SerializingObject.h"
|
||||
|
||||
@@ -90,6 +91,8 @@ private:
|
||||
QLineEdit * m_nameLineEdit;
|
||||
Knob * m_volumeKnob;
|
||||
Knob * m_panningKnob;
|
||||
PixmapButton *m_muteBtn;
|
||||
PixmapButton *m_soloBtn;
|
||||
MixerChannelLcdSpinBox * m_mixerChannelNumber;
|
||||
|
||||
EffectRackView * m_effectRack;
|
||||
|
||||
@@ -219,9 +219,9 @@ private:
|
||||
|
||||
protected:
|
||||
BoolModel m_mutedModel;
|
||||
BoolModel m_soloModel;
|
||||
|
||||
private:
|
||||
BoolModel m_soloModel;
|
||||
bool m_mutedBeforeSolo;
|
||||
|
||||
clipVector m_clips;
|
||||
|
||||
@@ -48,12 +48,12 @@ class FadeButton;
|
||||
class TrackContainerView;
|
||||
|
||||
|
||||
const int DEFAULT_SETTINGS_WIDGET_WIDTH = 256;
|
||||
const int DEFAULT_SETTINGS_WIDGET_WIDTH = 260;
|
||||
const int TRACK_OP_WIDTH = 78;
|
||||
// This shaves 150-ish pixels off track buttons,
|
||||
// ruled from config: ui.compacttrackbuttons
|
||||
const int DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT = 128;
|
||||
const int TRACK_OP_WIDTH_COMPACT = 62;
|
||||
const int DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT = 136;
|
||||
const int TRACK_OP_WIDTH_COMPACT = TRACK_OP_WIDTH;
|
||||
|
||||
|
||||
class TrackView : public QWidget, public ModelView, public JournallingObject
|
||||
|
||||
@@ -109,21 +109,21 @@ MixerChannelView::MixerChannelView(QWidget* parent, MixerView* mixerView, int ch
|
||||
|
||||
m_muteButton = new PixmapButton(this, tr("Mute"));
|
||||
m_muteButton->setModel(&mixerChannel->m_muteModel);
|
||||
m_muteButton->setActiveGraphic(embed::getIconPixmap("led_off"));
|
||||
m_muteButton->setInactiveGraphic(embed::getIconPixmap("led_green"));
|
||||
m_muteButton->setActiveGraphic(embed::getIconPixmap("mute_active"));
|
||||
m_muteButton->setInactiveGraphic(embed::getIconPixmap("mute_inactive"));
|
||||
m_muteButton->setCheckable(true);
|
||||
m_muteButton->setToolTip(tr("Mute this channel"));
|
||||
|
||||
m_soloButton = new PixmapButton(this, tr("Solo"));
|
||||
m_soloButton->setModel(&mixerChannel->m_soloModel);
|
||||
m_soloButton->setActiveGraphic(embed::getIconPixmap("led_red"));
|
||||
m_soloButton->setInactiveGraphic(embed::getIconPixmap("led_off"));
|
||||
m_soloButton->setActiveGraphic(embed::getIconPixmap("solo_active"));
|
||||
m_soloButton->setInactiveGraphic(embed::getIconPixmap("solo_inactive"));
|
||||
m_soloButton->setCheckable(true);
|
||||
m_soloButton->setToolTip(tr("Solo this channel"));
|
||||
|
||||
auto soloMuteLayout = new QVBoxLayout();
|
||||
soloMuteLayout->setContentsMargins(0, 0, 0, 0);
|
||||
soloMuteLayout->setSpacing(0);
|
||||
soloMuteLayout->setContentsMargins(0, 2, 0, 2);
|
||||
soloMuteLayout->setSpacing(2);
|
||||
soloMuteLayout->addWidget(m_soloButton, 0, Qt::AlignHCenter);
|
||||
soloMuteLayout->addWidget(m_muteButton, 0, Qt::AlignHCenter);
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "EffectRackView.h"
|
||||
#include "PixmapButton.h"
|
||||
#include "embed.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "Knob.h"
|
||||
@@ -95,46 +96,66 @@ SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) :
|
||||
QString labelStyleSheet = "font-size: 10px;";
|
||||
Qt::Alignment labelAlignment = Qt::AlignHCenter | Qt::AlignTop;
|
||||
Qt::Alignment widgetAlignment = Qt::AlignHCenter | Qt::AlignCenter;
|
||||
|
||||
auto soloMuteLayout = new QVBoxLayout();
|
||||
soloMuteLayout->setContentsMargins(0, 0, 2, 0);
|
||||
soloMuteLayout->setSpacing(2);
|
||||
|
||||
m_muteBtn = new PixmapButton(this, tr("Mute"));
|
||||
m_muteBtn->setModel(&m_track->m_mutedModel);
|
||||
m_muteBtn->setActiveGraphic(embed::getIconPixmap("mute_active"));
|
||||
m_muteBtn->setInactiveGraphic(embed::getIconPixmap("mute_inactive"));
|
||||
m_muteBtn->setCheckable(true);
|
||||
m_muteBtn->setToolTip(tr("Mute this sample track"));
|
||||
soloMuteLayout->addWidget(m_muteBtn, 0, widgetAlignment);
|
||||
|
||||
m_soloBtn = new PixmapButton(this, tr("Solo"));
|
||||
m_soloBtn->setModel(&m_track->m_soloModel);
|
||||
m_soloBtn->setActiveGraphic(embed::getIconPixmap("solo_active"));
|
||||
m_soloBtn->setInactiveGraphic(embed::getIconPixmap("solo_inactive"));
|
||||
m_soloBtn->setCheckable(true);
|
||||
m_soloBtn->setToolTip(tr("Solo this sample track"));
|
||||
soloMuteLayout->addWidget(m_soloBtn, 0, widgetAlignment);
|
||||
|
||||
basicControlsLayout->addLayout(soloMuteLayout, 0, 0, 2, 1, widgetAlignment);
|
||||
|
||||
// set up volume knob
|
||||
m_volumeKnob = new Knob(KnobType::Bright26, nullptr, tr("Sample volume"));
|
||||
m_volumeKnob->setVolumeKnob(true);
|
||||
m_volumeKnob->setHintText(tr("Volume:"), "%");
|
||||
|
||||
basicControlsLayout->addWidget(m_volumeKnob, 0, 0);
|
||||
basicControlsLayout->addWidget(m_volumeKnob, 0, 1);
|
||||
basicControlsLayout->setAlignment(m_volumeKnob, widgetAlignment);
|
||||
|
||||
auto label = new QLabel(tr("VOL"), this);
|
||||
label->setStyleSheet(labelStyleSheet);
|
||||
basicControlsLayout->addWidget(label, 1, 0);
|
||||
basicControlsLayout->addWidget(label, 1, 1);
|
||||
basicControlsLayout->setAlignment(label, labelAlignment);
|
||||
|
||||
|
||||
// set up panning knob
|
||||
m_panningKnob = new Knob(KnobType::Bright26, nullptr, tr("Panning"));
|
||||
m_panningKnob->setHintText(tr("Panning:"), "");
|
||||
|
||||
basicControlsLayout->addWidget(m_panningKnob, 0, 1);
|
||||
basicControlsLayout->addWidget(m_panningKnob, 0, 2);
|
||||
basicControlsLayout->setAlignment(m_panningKnob, widgetAlignment);
|
||||
|
||||
label = new QLabel(tr("PAN"),this);
|
||||
label->setStyleSheet(labelStyleSheet);
|
||||
basicControlsLayout->addWidget(label, 1, 1);
|
||||
basicControlsLayout->addWidget(label, 1, 2);
|
||||
basicControlsLayout->setAlignment(label, labelAlignment);
|
||||
|
||||
|
||||
basicControlsLayout->setColumnStretch(2, 1);
|
||||
basicControlsLayout->setColumnStretch(3, 1);
|
||||
|
||||
|
||||
// setup spinbox for selecting Mixer-channel
|
||||
m_mixerChannelNumber = new MixerChannelLcdSpinBox(2, nullptr, tr("Mixer channel"), m_stv);
|
||||
|
||||
basicControlsLayout->addWidget(m_mixerChannelNumber, 0, 3);
|
||||
basicControlsLayout->addWidget(m_mixerChannelNumber, 0, 4);
|
||||
basicControlsLayout->setAlignment(m_mixerChannelNumber, widgetAlignment);
|
||||
|
||||
label = new QLabel(tr("CHANNEL"), this);
|
||||
label = new QLabel(tr("CHAN"), this);
|
||||
label->setStyleSheet(labelStyleSheet);
|
||||
basicControlsLayout->addWidget(label, 1, 3);
|
||||
basicControlsLayout->addWidget(label, 1, 4);
|
||||
basicControlsLayout->setAlignment(label, labelAlignment);
|
||||
|
||||
generalSettingsLayout->addLayout(basicControlsLayout);
|
||||
|
||||
@@ -139,74 +139,90 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
|
||||
QString labelStyleSheet = "font-size: 10px;";
|
||||
Qt::Alignment labelAlignment = Qt::AlignHCenter | Qt::AlignTop;
|
||||
Qt::Alignment widgetAlignment = Qt::AlignHCenter | Qt::AlignCenter;
|
||||
|
||||
auto soloMuteLayout = new QVBoxLayout();
|
||||
soloMuteLayout->setContentsMargins(0, 0, 2, 0);
|
||||
soloMuteLayout->setSpacing(2);
|
||||
|
||||
m_muteBtn = new PixmapButton(this, tr("Mute"));
|
||||
m_muteBtn->setModel(&m_track->m_mutedModel);
|
||||
m_muteBtn->setActiveGraphic(embed::getIconPixmap("mute_active"));
|
||||
m_muteBtn->setInactiveGraphic(embed::getIconPixmap("mute_inactive"));
|
||||
m_muteBtn->setCheckable(true);
|
||||
m_muteBtn->setToolTip(tr("Mute this instrument"));
|
||||
soloMuteLayout->addWidget(m_muteBtn, 0, widgetAlignment);
|
||||
|
||||
m_soloBtn = new PixmapButton(this, tr("Solo"));
|
||||
m_soloBtn->setModel(&m_track->m_soloModel);
|
||||
m_soloBtn->setActiveGraphic(embed::getIconPixmap("solo_active"));
|
||||
m_soloBtn->setInactiveGraphic(embed::getIconPixmap("solo_inactive"));
|
||||
m_soloBtn->setCheckable(true);
|
||||
m_soloBtn->setToolTip(tr("Solo this instrument"));
|
||||
soloMuteLayout->addWidget(m_soloBtn, 0, widgetAlignment);
|
||||
|
||||
basicControlsLayout->addLayout(soloMuteLayout, 0, 0, 2, 1, widgetAlignment);
|
||||
|
||||
// set up volume knob
|
||||
m_volumeKnob = new Knob( KnobType::Bright26, nullptr, tr( "Volume" ) );
|
||||
m_volumeKnob->setVolumeKnob( true );
|
||||
m_volumeKnob->setHintText( tr( "Volume:" ), "%" );
|
||||
|
||||
basicControlsLayout->addWidget( m_volumeKnob, 0, 0 );
|
||||
basicControlsLayout->addWidget(m_volumeKnob, 0, 1);
|
||||
basicControlsLayout->setAlignment( m_volumeKnob, widgetAlignment );
|
||||
|
||||
auto label = new QLabel(tr("VOL"), this);
|
||||
label->setStyleSheet( labelStyleSheet );
|
||||
basicControlsLayout->addWidget( label, 1, 0);
|
||||
basicControlsLayout->setAlignment( label, labelAlignment );
|
||||
|
||||
label->setStyleSheet(labelStyleSheet);
|
||||
basicControlsLayout->addWidget(label, 1, 1);
|
||||
basicControlsLayout->setAlignment(label, labelAlignment);
|
||||
|
||||
// set up panning knob
|
||||
m_panningKnob = new Knob( KnobType::Bright26, nullptr, tr( "Panning" ) );
|
||||
m_panningKnob->setHintText( tr( "Panning:" ), "" );
|
||||
|
||||
basicControlsLayout->addWidget( m_panningKnob, 0, 1 );
|
||||
basicControlsLayout->addWidget(m_panningKnob, 0, 2);
|
||||
basicControlsLayout->setAlignment( m_panningKnob, widgetAlignment );
|
||||
|
||||
label = new QLabel( tr( "PAN" ), this );
|
||||
label->setStyleSheet( labelStyleSheet );
|
||||
basicControlsLayout->addWidget( label, 1, 1);
|
||||
basicControlsLayout->addWidget(label, 1, 2);
|
||||
basicControlsLayout->setAlignment( label, labelAlignment );
|
||||
|
||||
|
||||
basicControlsLayout->setColumnStretch(2, 1);
|
||||
|
||||
basicControlsLayout->setColumnStretch(3, 1);
|
||||
|
||||
// set up pitch knob
|
||||
m_pitchKnob = new Knob( KnobType::Bright26, nullptr, tr( "Pitch" ) );
|
||||
m_pitchKnob->setHintText( tr( "Pitch:" ), " " + tr( "cents" ) );
|
||||
|
||||
basicControlsLayout->addWidget( m_pitchKnob, 0, 3 );
|
||||
basicControlsLayout->addWidget(m_pitchKnob, 0, 4);
|
||||
basicControlsLayout->setAlignment( m_pitchKnob, widgetAlignment );
|
||||
|
||||
m_pitchLabel = new QLabel( tr( "PITCH" ), this );
|
||||
m_pitchLabel->setStyleSheet( labelStyleSheet );
|
||||
basicControlsLayout->addWidget( m_pitchLabel, 1, 3);
|
||||
basicControlsLayout->addWidget(m_pitchLabel, 1, 4);
|
||||
basicControlsLayout->setAlignment( m_pitchLabel, labelAlignment );
|
||||
|
||||
|
||||
// set up pitch range knob
|
||||
m_pitchRangeSpinBox= new LcdSpinBox( 2, nullptr, tr( "Pitch range (semitones)" ) );
|
||||
|
||||
basicControlsLayout->addWidget( m_pitchRangeSpinBox, 0, 4 );
|
||||
basicControlsLayout->addWidget(m_pitchRangeSpinBox, 0, 5);
|
||||
basicControlsLayout->setAlignment( m_pitchRangeSpinBox, widgetAlignment );
|
||||
|
||||
m_pitchRangeLabel = new QLabel( tr( "RANGE" ), this );
|
||||
m_pitchRangeLabel->setStyleSheet( labelStyleSheet );
|
||||
basicControlsLayout->addWidget( m_pitchRangeLabel, 1, 4);
|
||||
basicControlsLayout->addWidget(m_pitchRangeLabel, 1, 5);
|
||||
basicControlsLayout->setAlignment( m_pitchRangeLabel, labelAlignment );
|
||||
|
||||
|
||||
basicControlsLayout->setColumnStretch(5, 1);
|
||||
|
||||
basicControlsLayout->setColumnStretch(6, 1);
|
||||
|
||||
// setup spinbox for selecting Mixer-channel
|
||||
m_mixerChannelNumber = new MixerChannelLcdSpinBox(2, nullptr, tr("Mixer channel"), m_itv);
|
||||
|
||||
basicControlsLayout->addWidget( m_mixerChannelNumber, 0, 6 );
|
||||
basicControlsLayout->addWidget(m_mixerChannelNumber, 0, 7);
|
||||
basicControlsLayout->setAlignment( m_mixerChannelNumber, widgetAlignment );
|
||||
|
||||
label = new QLabel( tr( "CHANNEL" ), this );
|
||||
label = new QLabel(tr("CHAN"), this);
|
||||
label->setStyleSheet( labelStyleSheet );
|
||||
basicControlsLayout->addWidget( label, 1, 6);
|
||||
basicControlsLayout->addWidget(label, 1, 7);
|
||||
basicControlsLayout->setAlignment( label, labelAlignment );
|
||||
|
||||
auto saveSettingsBtn = new QPushButton(embed::getIconPixmap("project_save"), QString());
|
||||
@@ -216,11 +232,11 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
|
||||
|
||||
saveSettingsBtn->setToolTip(tr("Save current instrument track settings in a preset file"));
|
||||
|
||||
basicControlsLayout->addWidget( saveSettingsBtn, 0, 7 );
|
||||
basicControlsLayout->addWidget(saveSettingsBtn, 0, 8);
|
||||
|
||||
label = new QLabel( tr( "SAVE" ), this );
|
||||
label->setStyleSheet( labelStyleSheet );
|
||||
basicControlsLayout->addWidget( label, 1, 7);
|
||||
basicControlsLayout->addWidget(label, 1, 8);
|
||||
basicControlsLayout->setAlignment( label, labelAlignment );
|
||||
|
||||
generalSettingsLayout->addLayout( basicControlsLayout );
|
||||
|
||||
@@ -84,7 +84,7 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
|
||||
auto operationsWidget = new QWidget(this);
|
||||
auto operationsLayout = new QHBoxLayout(operationsWidget);
|
||||
operationsLayout->setContentsMargins(0, 0, 0, 0);
|
||||
operationsLayout->setSpacing(0);
|
||||
operationsLayout->setSpacing(2);
|
||||
|
||||
m_trackOps = new QPushButton(operationsWidget);
|
||||
m_trackOps->setFocusPolicy( Qt::NoFocus );
|
||||
@@ -124,33 +124,14 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
|
||||
return wrapperWidget;
|
||||
};
|
||||
|
||||
auto muteWidget = buildPixmapButtonWrappedInWidget(operationsWidget, tr("Mute"), "led_off", "led_green", m_muteBtn);
|
||||
auto soloWidget = buildPixmapButtonWrappedInWidget(operationsWidget, tr("Solo"), "led_red", "led_off", m_soloBtn);
|
||||
auto muteWidget = buildPixmapButtonWrappedInWidget(operationsWidget, tr("Mute"), "mute_active", "mute_inactive", m_muteBtn);
|
||||
auto soloWidget = buildPixmapButtonWrappedInWidget(operationsWidget, tr("Solo"), "solo_active", "solo_inactive", m_soloBtn);
|
||||
|
||||
operationsLayout->addWidget(m_trackOps, Qt::AlignCenter);
|
||||
operationsLayout->addSpacing(5);
|
||||
operationsLayout->addWidget(m_trackOps);
|
||||
operationsLayout->addWidget(muteWidget);
|
||||
operationsLayout->addWidget(soloWidget);
|
||||
|
||||
if( ConfigManager::inst()->value( "ui",
|
||||
"compacttrackbuttons" ).toInt() )
|
||||
{
|
||||
auto vlayout = new QVBoxLayout();
|
||||
vlayout->setContentsMargins(0, 0, 0, 0);
|
||||
vlayout->setSpacing(0);
|
||||
vlayout->addStretch(1);
|
||||
vlayout->addWidget(muteWidget);
|
||||
vlayout->addWidget(soloWidget);
|
||||
vlayout->addStretch(1);
|
||||
operationsLayout->addLayout(vlayout);
|
||||
}
|
||||
else
|
||||
{
|
||||
operationsLayout->addWidget(muteWidget, Qt::AlignCenter);
|
||||
operationsLayout->addWidget(soloWidget, Qt::AlignCenter);
|
||||
}
|
||||
|
||||
operationsLayout->addStretch(1);
|
||||
|
||||
layout->addWidget(operationsWidget, 0, Qt::AlignTop);
|
||||
layout->addWidget(operationsWidget, 0, Qt::AlignCenter | Qt::AlignLeading);
|
||||
|
||||
connect( this, SIGNAL(trackRemovalScheduled(lmms::gui::TrackView*)),
|
||||
m_trackView->trackContainerView(),
|
||||
|
||||
Reference in New Issue
Block a user