Skip to content

Commit

Permalink
Fix resizeable instrument windows being unable to resize
Browse files Browse the repository at this point in the history
  • Loading branch information
SpomJ committed Nov 18, 2024
1 parent b477e6a commit 8fa469d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/gui/instrument/InstrumentTrackWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
// setup sizes and policies
generalSettingsWidget->setMaximumHeight(90);
generalSettingsWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
vlayout->setSizeConstraint(QLayout::SetFixedSize);
m_tabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

vlayout->addWidget( generalSettingsWidget );
Expand All @@ -289,9 +288,13 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
if (!m_instrumentView->isResizable()) {
flags |= Qt::MSWindowsFixedSizeDialogHint;
// any better way than this?
setFixedSize(sizeHint());
// this should replace that; it does not. Ask Qt why.
// Does the same thing, for detached detached windows, for other OSs.

} else {
subWin->setMaximumSize(m_instrumentView->maximumHeight() + 12, m_instrumentView->maximumWidth() + 208);
subWin->setMinimumSize( m_instrumentView->minimumWidth() + 12, m_instrumentView->minimumHeight() + 208);
subWin->setMaximumSize(m_instrumentView->maximumWidth() + 12, m_instrumentView->maximumHeight() + 208);
subWin->setMinimumSize(m_instrumentView->minimumWidth() + 12, m_instrumentView->minimumHeight() + 208);
}
flags &= ~Qt::WindowMaximizeButtonHint;
subWin->setWindowFlags( flags );
Expand Down

0 comments on commit 8fa469d

Please sign in to comment.