Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/gui/instrument/InstrumentSoundShapingView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
19 changes: 19 additions & 0 deletions src/gui/instrument/InstrumentTrackWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading