Skip to content

Commit

Permalink
Add some more spacing around plugin text
Browse files Browse the repository at this point in the history
Followup 36c844b
  • Loading branch information
m-kuhn committed May 27, 2015
1 parent 90b796c commit be15d95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/pluginmanager/qgspluginitemdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ QSize QgsPluginItemDelegate::sizeHint( const QStyleOptionViewItem & option, cons
Q_UNUSED( option );
Q_UNUSED( index );
// Calculate row height, adds some 20% padding
int pixelsHigh = int(QApplication::fontMetrics().height() * 1.2);
int pixelsHigh = QApplication::fontMetrics().height() * 1.4;
return QSize( pixelsHigh, pixelsHigh );
}

Expand Down Expand Up @@ -68,8 +68,8 @@ void QgsPluginItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem

if ( !iconPixmap.isNull() )
{
int iconSize = option.rect.height();
painter->drawPixmap( option.rect.left() + pixelsHigh , option.rect.top(), iconSize, iconSize, iconPixmap );
int iconSize = pixelsHigh;
painter->drawPixmap( option.rect.left() + 0.2 * pixelsHigh , option.rect.top() + 0.2 * pixelsHigh, iconSize, iconSize, iconPixmap );
}

// Draw the text
Expand All @@ -95,7 +95,7 @@ void QgsPluginItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem
font.setBold( true );
painter->setFont( font );
}
painter->drawText( option.rect.left() + int( pixelsHigh * 2.3 ), option.rect.bottom() - int( pixelsHigh / 6), index.data( Qt::DisplayRole ).toString() );
painter->drawText( option.rect.left() + pixelsHigh * 1.4, option.rect.bottom() - pixelsHigh * 0.4, index.data( Qt::DisplayRole ).toString() );

painter->restore();
}
Expand Down

0 comments on commit be15d95

Please sign in to comment.