From 083fb229355eb2cec68681b39185405e93e60310 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 16 Sep 2014 06:46:14 +0200 Subject: [PATCH] * VCenter source icon in row. --- src/libtomahawk/playlist/PlaylistItemDelegate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index 341ec52ed..c183bfe9e 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -645,7 +645,8 @@ PlaylistItemDelegate::drawTrack( QPainter* painter, const QStyleOptionViewItem& // draw number if ( ( option.state & QStyle::State_Selected || hoveringOver() == index ) && item->query()->numResults() > 0 ) { - const QRect sourceIconRect( numberRect.x(), numberRect.y() + 10, numberRect.size().height() - 20, numberRect.size().height() - 20 ); + const int iconHeight = numberRect.size().height() / 2; + const QRect sourceIconRect( numberRect.x(), numberRect.y() + ( numberRect.size().height() - iconHeight ) / 2, iconHeight, iconHeight ); painter->drawPixmap( sourceIconRect, item->query()->results().first()->sourceIcon( TomahawkUtils::Original, sourceIconRect.size() ) ); } else