From fe4cf3c4ec55bf79f48a862d46cdcd6f0788c253 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Tue, 15 Dec 2015 17:06:26 +0100 Subject: [PATCH] Add some spacing between label view item rows. --- src/modules/partition/gui/PartitionLabelsView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/gui/PartitionLabelsView.cpp b/src/modules/partition/gui/PartitionLabelsView.cpp index e9a427ca5..51f2814e5 100644 --- a/src/modules/partition/gui/PartitionLabelsView.cpp +++ b/src/modules/partition/gui/PartitionLabelsView.cpp @@ -205,7 +205,7 @@ PartitionLabelsView::drawLabels( QPainter* painter, if ( label_x + labelSize.width() > rect.width() ) //wrap to new line if overflow { label_x = rect.x(); - label_y += labelSize.height(); + label_y += labelSize.height() + labelSize.height() / 4; } drawLabel( painter, texts, labelColor, QPoint( label_x, label_y ) ); @@ -261,7 +261,8 @@ PartitionLabelsView::sizeForAllLabels( int maxLineWidth ) const .height(); } - int totalHeight = numLines * singleLabelHeight; + int totalHeight = numLines * singleLabelHeight + + ( numLines - 1 ) * singleLabelHeight / 4; //spacings return QSize( maxLineWidth, totalHeight ); }