[libcalamaresui] More careful in unmarginLayout
This commit is contained in:
parent
bcad698164
commit
329f21093b
@ -180,16 +180,20 @@ createRoundedImage( const QPixmap& pixmap, const QSize& size, float frameWidthPc
|
||||
void
|
||||
unmarginLayout( QLayout* layout )
|
||||
{
|
||||
layout->setContentsMargins( 0, 0, 0, 0 );
|
||||
layout->setMargin( 0 );
|
||||
layout->setSpacing( 0 );
|
||||
|
||||
for ( int i = 0; i < layout->count(); i++ )
|
||||
if ( layout )
|
||||
{
|
||||
QLayout* childLayout = layout->itemAt( i )->layout();
|
||||
if ( childLayout )
|
||||
layout->setContentsMargins( 0, 0, 0, 0 );
|
||||
layout->setMargin( 0 );
|
||||
layout->setSpacing( 0 );
|
||||
|
||||
for ( int i = 0; i < layout->count(); i++ )
|
||||
{
|
||||
unmarginLayout( childLayout );
|
||||
auto* childItem = layout->itemAt( i );
|
||||
QLayout* childLayout = childItem ? childItem->layout() : nullptr;
|
||||
if ( childLayout )
|
||||
{
|
||||
unmarginLayout( childLayout );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user