Skip to content

Commit

Permalink
Subwindows: Fix some size constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-w committed May 5, 2017
1 parent bda4590 commit 3b9f57a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions plugins/LadspaEffect/LadspaControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ LadspaControlDialog::LadspaControlDialog( LadspaControls * _ctl ) :
m_stereoLink( NULL )
{
QVBoxLayout * mainLay = new QVBoxLayout( this );
mainLay->setSizeConstraint(QLayout::SetFixedSize);

m_effectLayout = new QHBoxLayout();
mainLay->addLayout( m_effectLayout );
Expand Down
6 changes: 3 additions & 3 deletions src/gui/widgets/ControllerRackView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ ControllerRackView::ControllerRackView( ) :
layout->addWidget( m_addButton );
this->setLayout( layout );

setFixedWidth( 350 );
setMinimumHeight( 200 );

QMdiSubWindow * subWin = gui->mainWindow()->addWindowedWidget( this );

// No maximize button
Expand All @@ -84,9 +87,6 @@ ControllerRackView::ControllerRackView( ) :

subWin->setAttribute( Qt::WA_DeleteOnClose, false );
subWin->move( 680, 310 );
subWin->resize( 350, 200 );
subWin->setFixedWidth( 350 );
subWin->setMinimumHeight( 200 );
}


Expand Down
4 changes: 2 additions & 2 deletions src/gui/widgets/EffectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/

#include <QLabel>
#include <QLayout>
#include <QPushButton>
#include <QMdiArea>
#include <QMdiSubWindow>
Expand Down Expand Up @@ -108,8 +109,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
if( m_controlView )
{
m_subWindow = gui->mainWindow()->addWindowedWidget( m_controlView );
m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
m_subWindow->setFixedSize( m_subWindow->size() );
m_subWindow->layout()->setSizeConstraint(QLayout::SetFixedSize);

Qt::WindowFlags flags = m_subWindow->windowFlags();
flags &= ~Qt::WindowMaximizeButtonHint;
Expand Down

0 comments on commit 3b9f57a

Please sign in to comment.