[libcalamaresui] Set margins based on viewstep suggestion

This commit is contained in:
Adriaan de Groot 2020-06-24 22:12:59 +02:00
parent d7ed450dbf
commit d952faf909

View File

@ -131,11 +131,11 @@ ViewManager::insertViewStep( int before, ViewStep* step )
}
else
{
// step->adjustMargins() "some magic"
QLayout* layout = step->widget()->layout();
if ( layout )
{
layout->setContentsMargins( 0, 0, 0, 0 );
const auto margins = step->widgetMargins( m_panelSides );
layout->setContentsMargins( margins.width(), margins.height(), margins.width(), margins.height() );
}
m_stack->insertWidget( before, step->widget() );