diff --git a/include/EffectRackView.h b/include/EffectRackView.h index 4a90c6b7a78..fec627a56f9 100644 --- a/include/EffectRackView.h +++ b/include/EffectRackView.h @@ -64,6 +64,8 @@ private slots: private: void modelChanged() override; + QSize sizeHint() const override; + QSize minimumSizeHint() const override { return sizeHint(); } inline EffectChain* fxChain() { diff --git a/src/gui/EffectRackView.cpp b/src/gui/EffectRackView.cpp index 478e117fe80..315faa6d382 100644 --- a/src/gui/EffectRackView.cpp +++ b/src/gui/EffectRackView.cpp @@ -273,4 +273,13 @@ void EffectRackView::modelChanged() +QSize EffectRackView::sizeHint() const +{ + // Use the formula from InstrumentTrackWindow.cpp + return QSize{EffectRackView::DEFAULT_WIDTH, 254 - 4 - 1}; +} + + + + } // namespace lmms::gui diff --git a/src/gui/instrument/InstrumentTrackWindow.cpp b/src/gui/instrument/InstrumentTrackWindow.cpp index 8b868bb50dd..1c9c93a09f9 100644 --- a/src/gui/instrument/InstrumentTrackWindow.cpp +++ b/src/gui/instrument/InstrumentTrackWindow.cpp @@ -265,7 +265,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : m_tabWidget->addTab(m_tuningView, tr("Tuning and transposition"), "tuning_tab", 5); adjustTabSize(m_ssView); adjustTabSize(instrumentFunctions); - m_effectView->resize(EffectRackView::DEFAULT_WIDTH, INSTRUMENT_HEIGHT - 4 - 1); + // EffectRackView has sizeHint to be QSize(EffectRackView::DEFAULT_WIDTH, INSTRUMENT_HEIGHT - 4 - 1) adjustTabSize(m_midiView); adjustTabSize(m_tuningView);