From 6dd64178e04371585777ad136b22495a33ae6411 Mon Sep 17 00:00:00 2001 From: saker Date: Wed, 18 Sep 2024 12:33:01 -0400 Subject: [PATCH 1/5] Set the spacing to 3 and the margins to 3 --- src/gui/MixerChannelView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp index aa3ce5f87b5..4b63b3f9bbe 100644 --- a/src/gui/MixerChannelView.cpp +++ b/src/gui/MixerChannelView.cpp @@ -128,8 +128,8 @@ namespace lmms::gui m_effectRackView->setFixedWidth(EffectRackView::DEFAULT_WIDTH); auto mainLayout = new QVBoxLayout{this}; - mainLayout->setContentsMargins(0, 0, 0, 0); - mainLayout->setSpacing(0); + mainLayout->setContentsMargins(3, 3, 3, 3); + mainLayout->setSpacing(3); mainLayout->addWidget(m_receiveArrow, 0, Qt::AlignHCenter); mainLayout->addWidget(m_sendButton, 0, Qt::AlignHCenter); mainLayout->addWidget(m_sendKnob, 0, Qt::AlignHCenter); From b7d8b15f5c5aad7c02981ea2387c107728e666d5 Mon Sep 17 00:00:00 2001 From: saker Date: Wed, 18 Sep 2024 13:54:26 -0400 Subject: [PATCH 2/5] Remove solo/mute layout Since the spacing was reduced to 3, this should not be needed anymore --- src/gui/MixerChannelView.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp index 4b63b3f9bbe..7f39afbd3e7 100644 --- a/src/gui/MixerChannelView.cpp +++ b/src/gui/MixerChannelView.cpp @@ -113,12 +113,6 @@ namespace lmms::gui m_soloButton->setCheckable(true); m_soloButton->setToolTip(tr("Solo this channel")); - QVBoxLayout* soloMuteLayout = new QVBoxLayout(); - soloMuteLayout->setContentsMargins(0, 0, 0, 0); - soloMuteLayout->setSpacing(0); - soloMuteLayout->addWidget(m_soloButton, 0, Qt::AlignHCenter); - soloMuteLayout->addWidget(m_muteButton, 0, Qt::AlignHCenter); - m_fader = new Fader{&mixerChannel->m_volumeModel, tr("Fader %1").arg(channelIndex), this}; m_peakIndicator = new PeakIndicator(this); @@ -136,7 +130,8 @@ namespace lmms::gui mainLayout->addWidget(m_sendArrow, 0, Qt::AlignHCenter); mainLayout->addWidget(m_channelNumberLcd, 0, Qt::AlignHCenter); mainLayout->addWidget(m_renameLineEditView, 0, Qt::AlignHCenter); - mainLayout->addLayout(soloMuteLayout, 0); + mainLayout->addWidget(m_soloButton, 0, Qt::AlignHCenter); + mainLayout->addWidget(m_muteButton, 0, Qt::AlignHCenter); mainLayout->addWidget(m_peakIndicator); mainLayout->addWidget(m_fader, 1, Qt::AlignHCenter); From 67b3027f588160f0eae1a560159dd021beac3aaa Mon Sep 17 00:00:00 2001 From: saker Date: Wed, 18 Sep 2024 23:48:36 -0400 Subject: [PATCH 3/5] Revert "Remove solo/mute layout" This reverts commit b7d8b15f5c5aad7c02981ea2387c107728e666d5. --- src/gui/MixerChannelView.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp index 7f39afbd3e7..4b63b3f9bbe 100644 --- a/src/gui/MixerChannelView.cpp +++ b/src/gui/MixerChannelView.cpp @@ -113,6 +113,12 @@ namespace lmms::gui m_soloButton->setCheckable(true); m_soloButton->setToolTip(tr("Solo this channel")); + QVBoxLayout* soloMuteLayout = new QVBoxLayout(); + soloMuteLayout->setContentsMargins(0, 0, 0, 0); + soloMuteLayout->setSpacing(0); + soloMuteLayout->addWidget(m_soloButton, 0, Qt::AlignHCenter); + soloMuteLayout->addWidget(m_muteButton, 0, Qt::AlignHCenter); + m_fader = new Fader{&mixerChannel->m_volumeModel, tr("Fader %1").arg(channelIndex), this}; m_peakIndicator = new PeakIndicator(this); @@ -130,8 +136,7 @@ namespace lmms::gui mainLayout->addWidget(m_sendArrow, 0, Qt::AlignHCenter); mainLayout->addWidget(m_channelNumberLcd, 0, Qt::AlignHCenter); mainLayout->addWidget(m_renameLineEditView, 0, Qt::AlignHCenter); - mainLayout->addWidget(m_soloButton, 0, Qt::AlignHCenter); - mainLayout->addWidget(m_muteButton, 0, Qt::AlignHCenter); + mainLayout->addLayout(soloMuteLayout, 0); mainLayout->addWidget(m_peakIndicator); mainLayout->addWidget(m_fader, 1, Qt::AlignHCenter); From 0fc559fdc75bbbd7baed7a91d411d89cf7eda778 Mon Sep 17 00:00:00 2001 From: saker Date: Thu, 19 Sep 2024 01:50:02 -0400 Subject: [PATCH 4/5] Set spacing to 2, horizontal margins to 4, and vertical margins equal to the spacing --- src/gui/MixerChannelView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp index 4b63b3f9bbe..47c66555432 100644 --- a/src/gui/MixerChannelView.cpp +++ b/src/gui/MixerChannelView.cpp @@ -128,8 +128,8 @@ namespace lmms::gui m_effectRackView->setFixedWidth(EffectRackView::DEFAULT_WIDTH); auto mainLayout = new QVBoxLayout{this}; - mainLayout->setContentsMargins(3, 3, 3, 3); - mainLayout->setSpacing(3); + mainLayout->setSpacing(2); + mainLayout->setContentsMargins(4, mainLayout->spacing(), 4, mainLayout->spacing()); mainLayout->addWidget(m_receiveArrow, 0, Qt::AlignHCenter); mainLayout->addWidget(m_sendButton, 0, Qt::AlignHCenter); mainLayout->addWidget(m_sendKnob, 0, Qt::AlignHCenter); From a23a5243106e1899c4ac04a14efa6d489da2299c Mon Sep 17 00:00:00 2001 From: saker Date: Thu, 19 Sep 2024 11:46:53 -0400 Subject: [PATCH 5/5] Final adjustments --- src/gui/MixerChannelView.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp index 47c66555432..91705e5d04b 100644 --- a/src/gui/MixerChannelView.cpp +++ b/src/gui/MixerChannelView.cpp @@ -113,7 +113,7 @@ namespace lmms::gui m_soloButton->setCheckable(true); m_soloButton->setToolTip(tr("Solo this channel")); - QVBoxLayout* soloMuteLayout = new QVBoxLayout(); + auto soloMuteLayout = new QVBoxLayout(); soloMuteLayout->setContentsMargins(0, 0, 0, 0); soloMuteLayout->setSpacing(0); soloMuteLayout->addWidget(m_soloButton, 0, Qt::AlignHCenter); @@ -128,15 +128,16 @@ namespace lmms::gui m_effectRackView->setFixedWidth(EffectRackView::DEFAULT_WIDTH); auto mainLayout = new QVBoxLayout{this}; + mainLayout->setContentsMargins(4, 4, 4, 4); mainLayout->setSpacing(2); - mainLayout->setContentsMargins(4, mainLayout->spacing(), 4, mainLayout->spacing()); + mainLayout->addWidget(m_receiveArrow, 0, Qt::AlignHCenter); mainLayout->addWidget(m_sendButton, 0, Qt::AlignHCenter); mainLayout->addWidget(m_sendKnob, 0, Qt::AlignHCenter); mainLayout->addWidget(m_sendArrow, 0, Qt::AlignHCenter); mainLayout->addWidget(m_channelNumberLcd, 0, Qt::AlignHCenter); mainLayout->addWidget(m_renameLineEditView, 0, Qt::AlignHCenter); - mainLayout->addLayout(soloMuteLayout, 0); + mainLayout->addLayout(soloMuteLayout); mainLayout->addWidget(m_peakIndicator); mainLayout->addWidget(m_fader, 1, Qt::AlignHCenter);