Skip to content
Permalink
Browse files

Add some more spacing around plugin text

Followup 36c844b
  • Loading branch information
m-kuhn committed May 27, 2015
1 parent 90b796c commit be15d95684c742fe8a28aa2f03654e9279df3720
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/app/pluginmanager/qgspluginitemdelegate.cpp
@@ -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 );
}

@@ -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
@@ -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();
}

0 comments on commit be15d95

Please sign in to comment.
You can’t perform that action at this time.