Skip to content

Commit

Permalink
Fix Components toolbox size
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Tomlinson committed May 19, 2019
1 parent ea7d6c5 commit d9ad9e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions QtPatcher/src/QtpMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void QtpMain::registerComponent( QtpComp::CompInfo const& compInfo )
_toolBox->deleteLater();
_toolBox = new QToolBox;
_toolBox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Ignored );
_toolBox->setMinimumWidth( std::max( _uiCompWidget->width(), _compWidget->width() ) );
_toolBox->setMinimumWidth( std::max( _uiCompWidget->sizeHint().width(), _compWidget->sizeHint().width() ) );
_toolBox->addItem( _compWidget, tr( "User Components" ) );
_toolBox->addItem( _uiCompWidget, tr( "UI Components" ) );

Expand Down Expand Up @@ -161,7 +161,7 @@ void QtpMain::createToolBox()

_toolBox = new QToolBox;
_toolBox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Ignored );
_toolBox->setMinimumWidth( std::max( _uiCompWidget->width(), _compWidget->width() ) );
_toolBox->setMinimumWidth( std::max( _uiCompWidget->sizeHint().width(), _compWidget->sizeHint().width() ) );
_toolBox->addItem( _compWidget, tr( "User Components" ) );
_toolBox->addItem( _uiCompWidget, tr( "UI Components" ) );
}
Expand Down
2 changes: 1 addition & 1 deletion UiComponents/FloatSlider/FloatSlider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class FloatSlider
QHBoxLayout* layout = new QHBoxLayout( widget );
layout->addWidget( slider );
layout->addWidget( label );
layout->setContentsMargins( 10, 10, 10, 10 );
layout->setContentsMargins( 15, 15, 15, 15 );
widget->resize( layout->sizeHint() );
}

Expand Down

0 comments on commit d9ad9e4

Please sign in to comment.