Fix sizeHint calculation, useless padding is useless.

This commit is contained in:
Teo Mrnjavac 2015-12-02 16:31:33 +01:00
parent ccc93d2c64
commit 78808251b9

View File

@ -329,8 +329,7 @@ PartitionPreview::sizeForLabel( const QStringList& text ) const
foreach ( const QString& textLine, text )
{
QSize textSize = fontMetrics().size( Qt::TextSingleLine, textLine );
if ( vertOffset == 0 )
vertOffset = textSize.height() / 2;
vertOffset += textSize.height();
width = qMax( width, textSize.width() );
}