From af19a09a3c909c7d6567253ca91bf17402e97add Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Tue, 20 Sep 2011 13:23:10 -0400 Subject: [PATCH] Smaller rows, and paint icon a bit bigger --- src/libtomahawk/jobview/JobStatusDelegate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/jobview/JobStatusDelegate.cpp b/src/libtomahawk/jobview/JobStatusDelegate.cpp index b5e3fea67..886db9420 100644 --- a/src/libtomahawk/jobview/JobStatusDelegate.cpp +++ b/src/libtomahawk/jobview/JobStatusDelegate.cpp @@ -24,7 +24,8 @@ #include #include -#define ROW_HEIGHT 20 +#define ROW_HEIGHT 15 +#define ICON_PADDING 1 #define PADDING 2 JobStatusDelegate::JobStatusDelegate( QObject* parent ) : QStyledItemDelegate ( parent ) @@ -51,7 +52,7 @@ JobStatusDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, // painter->drawLine( opt.rect.topLeft(), opt.rect.topRight() ); painter->setRenderHint( QPainter::Antialiasing ); - const QRect iconRect( PADDING, PADDING + opt.rect.y(), ROW_HEIGHT - 2*PADDING, ROW_HEIGHT - 2*PADDING ); + const QRect iconRect( ICON_PADDING, ICON_PADDING + opt.rect.y(), ROW_HEIGHT - 2*ICON_PADDING, ROW_HEIGHT - 2*ICON_PADDING ); QPixmap p = index.data( Qt::DecorationRole ).value< QPixmap >(); p = p.scaled( iconRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation ); painter->drawPixmap( iconRect, p );