From 7e7141f38816a0b7b293585858c69866c972d2f1 Mon Sep 17 00:00:00 2001 From: Johannes Lorenz Date: Sun, 17 Mar 2019 10:43:38 +0100 Subject: [PATCH] Fix too small instrument tabs Previously, they had been resized by the fixed size parent tab widget. We need to do this manually now. --- src/tracks/InstrumentTrack.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 6f4ad2b8e..fb9261ff7 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -1472,6 +1472,17 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : m_tabWidget->addTab( m_midiView, tr( "MIDI" ), "midi_tab", 4 ); m_tabWidget->addTab( m_miscView, tr( "Miscellaneous" ), "misc_tab", 5 ); + //! adjust size of any child widget of the main tab + //! required to keep the old look when using a variable sized tab widget + auto adjustSize = [](QWidget *w) { + w->setMinimumSize(INSTRUMENT_WIDTH, INSTRUMENT_HEIGHT + GRAPHIC_TAB_HEIGHT); + }; + adjustSize(m_ssView); + adjustSize(instrumentFunctions); + adjustSize(m_effectView); + adjustSize(m_midiView); + adjustSize(m_miscView); + // setup piano-widget m_pianoView = new PianoView( this ); m_pianoView->setMinimumHeight( PIANO_HEIGHT );