[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
|
void
|
||||||
unmarginLayout( QLayout* layout )
|
unmarginLayout( QLayout* layout )
|
||||||
{
|
{
|
||||||
layout->setContentsMargins( 0, 0, 0, 0 );
|
if ( layout )
|
||||||
layout->setMargin( 0 );
|
|
||||||
layout->setSpacing( 0 );
|
|
||||||
|
|
||||||
for ( int i = 0; i < layout->count(); i++ )
|
|
||||||
{
|
{
|
||||||
QLayout* childLayout = layout->itemAt( i )->layout();
|
layout->setContentsMargins( 0, 0, 0, 0 );
|
||||||
if ( childLayout )
|
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