Commit 2334ec8f authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] forced to align widgets on top if much space is left in the control panel

parent 511f14da
......@@ -51,13 +51,21 @@ WQtPropertyGroupWidget::WQtPropertyGroupWidget( WPropertyGroupBase::SPtr group,
m_pageLayout = new QVBoxLayout();
m_pageLayout->setMargin( WGLOBAL_MARGIN );
m_pageLayout->setSpacing( WGLOBAL_SPACING );
m_pageLayout->setAlignment( Qt::AlignTop );
m_controlLayout = new QGridLayout();
m_controlLayout->setMargin( WGLOBAL_MARGIN );
m_controlLayout->setSpacing( WGLOBAL_SPACING );
m_controlLayout->setAlignment( Qt::AlignTop );
m_pageLayout->addLayout( m_controlLayout );
// force widgets to horizontally be on top and shrink vertically to match scroll area
QSizePolicy sizePolicy( QSizePolicy::Expanding, QSizePolicy::Maximum );
sizePolicy.setHorizontalStretch( 0 );
sizePolicy.setVerticalStretch( 0 );
setSizePolicy( sizePolicy );
// add the groups children
// read lock, gets unlocked upon destruction (out of scope)
WPropertyGroupBase::PropertySharedContainerType::ReadTicket propAccess = group->getProperties();
......@@ -189,10 +197,9 @@ void WQtPropertyGroupWidget::addGroup( WQtPropertyGroupWidget* widget, bool asSc
boxLayout->addWidget( boxTitle, 0, 0 );
// set the button up
QSizePolicy sizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
QSizePolicy sizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
sizePolicy.setHorizontalStretch( 0 );
sizePolicy.setVerticalStretch( 0 );
sizePolicy.setHeightForWidth( boxTitle->sizePolicy().hasHeightForWidth() );
boxTitle->setSizePolicy( sizePolicy );
boxTitle->setCheckable( true );
boxTitle->setChecked( true );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment