From 98aecb1d265dc0d856780dc58480818dddc3049e Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Wed, 20 May 2020 20:58:11 +0200 Subject: [PATCH] use a separate layout for the pan controls --- ChangeLog | 4 ++-- src/audiomixerboard.cpp | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 89f7ee03..6277aea5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,8 +15,6 @@ - support intermediate Reaper RPP file while recording, coded by pljones (Ticket #170) -TODO fix incorrect what's this help texts - TODO fix problem with panning and GUI (vertical scroll bar issue in mixer board) TODO Keep lrelease? Does it work as expected? @@ -30,6 +28,8 @@ TODO WIP support internationalization TODO show mute state of others +TODO fix incorrect what's this help texts + diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 521a6d17..c8b88c88 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -56,6 +56,7 @@ CChannelFader::CChannelFader ( QWidget* pNW, QVBoxLayout* pMuteSoloGrid = new QVBoxLayout ( pMuteSoloBox ); QHBoxLayout* pLabelGrid = new QHBoxLayout ( pLabelInstBox ); QVBoxLayout* pLabelPictGrid = new QVBoxLayout ( ); + QVBoxLayout* pPanGrid = new QVBoxLayout ( ); // setup channel level plbrChannelLevel->setContentsMargins ( 0, 3, 2, 3 ); @@ -72,6 +73,8 @@ CChannelFader::CChannelFader ( QWidget* pNW, pPan->setValue ( AUD_MIX_PAN_MAX / 2 ); pPan->setFixedSize ( 55, 55 ); pPan->setNotchesVisible ( true ); + pPanGrid->addWidget ( pPanLabel, 0, Qt::AlignLeft ); + pPanGrid->addWidget ( pPan, 0, Qt::AlignHCenter ); // setup fader tag label (black bold text which is centered) plblLabel->setTextFormat ( Qt::PlainText ); @@ -84,6 +87,9 @@ CChannelFader::CChannelFader ( QWidget* pNW, // set margins of the layouts to zero to get maximum space for the controls pMainGrid->setContentsMargins ( 0, 0, 0, 0 ); + pPanGrid->setContentsMargins ( 0, 0, 0, 0 ); + pPanGrid->setSpacing ( 0 ); // only minimal space + pLevelsGrid->setContentsMargins ( 0, 0, 0, 0 ); pLevelsGrid->setSpacing ( 0 ); // only minimal space @@ -105,8 +111,7 @@ CChannelFader::CChannelFader ( QWidget* pNW, pMuteSoloGrid->addWidget ( pcbMute, 0, Qt::AlignLeft ); pMuteSoloGrid->addWidget ( pcbSolo, 0, Qt::AlignLeft ); - pMainGrid->addWidget ( pPanLabel, 0, Qt::AlignLeft ); - pMainGrid->addWidget ( pPan, 0, Qt::AlignHCenter ); + pMainGrid->addLayout ( pPanGrid ); pMainGrid->addWidget ( pLevelsBox, 0, Qt::AlignHCenter ); pMainGrid->addWidget ( pMuteSoloBox, 0, Qt::AlignHCenter ); pMainGrid->addWidget ( pLabelInstBox ); @@ -221,7 +226,7 @@ bool CChannelFader::GetDisplayChannelLevel() void CChannelFader::SetDisplayPans ( const bool eNDP ) { pPanLabel->setHidden ( !eNDP ); - pPan->setHidden ( !eNDP ); + pPan->setHidden ( !eNDP ); } void CChannelFader::SetupFaderTag ( const ESkillLevel eSkillLevel )