1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-18 06:48:23 +01:00

Set contents margins on widgets as well.

This commit is contained in:
Teo Mrnjavac 2014-09-08 17:12:10 +02:00
parent 2362bf9b90
commit 41f04a4a10

View File

@ -235,11 +235,11 @@ void
fixLayoutMargins( QLayout* layout, QWidget* parent )
{
DpiScaler scaler( parent );
tDebug() << "FIX MARGINS Found layout:" << layout << parent << layout->contentsMargins() << scaler.scaled( layout->contentsMargins() );
layout->setMargin( scaler.scaledX( layout->margin() ) );
layout->setContentsMargins( scaler.scaled( layout->contentsMargins() ) );
layout->setSpacing( scaler.scaledX( layout->spacing() ) );
parent->setContentsMargins( scaler.scaled( parent->contentsMargins() ) );
for ( int i = 0; i < layout->count(); i++ )
{
QLayout* childLayout = layout->itemAt( i )->layout();