Better partition label square size.

main
Teo Mrnjavac 9 years ago
parent 25e388aa29
commit ccc93d2c64

@ -38,7 +38,8 @@ static const int LAYOUT_MARGIN = 8;
static const int CORNER_RADIUS = 3; static const int CORNER_RADIUS = 3;
static const int EXTENDED_PARTITION_MARGIN = 4; static const int EXTENDED_PARTITION_MARGIN = 4;
static const int LABELS_MARGIN = 40; static const int LABELS_MARGIN = 40;
static const int LABEL_PARTITION_SQUARE_MARGIN = 18; static const int LABEL_PARTITION_SQUARE_MARGIN =
qMax( QFontMetrics( CalamaresUtils::defaultFont() ).ascent() - 2, 18 );
QStringList QStringList
buildUnknownDisklabelTexts( Device* dev ) buildUnknownDisklabelTexts( Device* dev )
@ -357,8 +358,11 @@ PartitionPreview::drawLabel( QPainter* painter,
painter->setPen( Qt::gray ); painter->setPen( Qt::gray );
width = qMax( width, textSize.width() ); width = qMax( width, textSize.width() );
} }
drawPartitionSquare( painter, QRect( pos.x(), pos.y() - 3, drawPartitionSquare( painter, QRect( pos.x(),
13, 13 ), color ); pos.y() - 3,
LABEL_PARTITION_SQUARE_MARGIN - 5,
LABEL_PARTITION_SQUARE_MARGIN - 5 ),
color );
painter->setPen( Qt::black ); painter->setPen( Qt::black );
} }

Loading…
Cancel
Save