diff --git a/src/gui/instrument/InstrumentSoundShapingView.cpp b/src/gui/instrument/InstrumentSoundShapingView.cpp index 91816c50cc6..c893df38da0 100644 --- a/src/gui/instrument/InstrumentSoundShapingView.cpp +++ b/src/gui/instrument/InstrumentSoundShapingView.cpp @@ -85,7 +85,6 @@ InstrumentSoundShapingView::InstrumentSoundShapingView(QWidget* parent) : m_singleStreamInfoLabel->setWordWrap(true); // TODO Could also be rendered in system font size... m_singleStreamInfoLabel->setFont(adjustedToPixelSize(m_singleStreamInfoLabel->font(), DEFAULT_FONT_SIZE)); - m_singleStreamInfoLabel->setFixedWidth(242); mainLayout->addWidget(m_singleStreamInfoLabel, 0, Qt::AlignTop); } diff --git a/src/gui/instrument/InstrumentTrackWindow.cpp b/src/gui/instrument/InstrumentTrackWindow.cpp index 0ee7c3eebe0..37f07714fc7 100644 --- a/src/gui/instrument/InstrumentTrackWindow.cpp +++ b/src/gui/instrument/InstrumentTrackWindow.cpp @@ -480,6 +480,25 @@ void InstrumentTrackWindow::updateInstrumentView() m_tabWidget->addTab( m_instrumentView, tr( "Plugin" ), "plugin_tab", 0 ); m_tabWidget->setActiveTab( 0 ); + // If instrument is resizable, unset size constraints on tabs. + // Otherwise, prevent other tabs from exceeding the size of the + // instrument tab + const auto maxSize = m_instrumentView->isResizable() + ? QSize{QWIDGETSIZE_MAX, QWIDGETSIZE_MAX} + : QSize{ + std::max(INSTRUMENT_WIDTH, m_instrumentView->width()), + std::max(INSTRUMENT_HEIGHT, m_instrumentView->maximumHeight()), + }; + m_tabWidget->setMaximumSize(maxSize); + // Individual tabs must also have their maximum widths set, + // otherwise they will remain wide, and their overflowing contents + // will get clipped. + m_ssView->setMaximumSize(maxSize); + m_instrumentFunctionsView->setMaximumSize(maxSize); + m_effectView->setMaximumSize(maxSize); + m_midiView->setMaximumSize(maxSize); + m_tuningView->setMaximumSize(maxSize); + m_ssView->setFunctionsHidden(m_track->m_instrument->isSingleStreamed()); modelChanged(); // Get the instrument window to refresh