diff --git a/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp index efcdb2e9b..493bcf0fc 100644 --- a/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp @@ -218,7 +218,7 @@ PlaylistLargeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& QFont smallFont = opt.font; smallFont.setPointSize( TomahawkUtils::defaultFontSize() - 2 ); - r.adjust( pixmapRect.width() + 12, 1, -28 - avatar.width(), 0 ); + r.adjust( pixmapRect.width() + 12, 1, - 20 - avatar.width(), 0 ); QRect leftRect = r.adjusted( 0, 0, -48, 0 ); QRect rightRect = r.adjusted( r.width() - smallBoldFontMetrics.width( TomahawkUtils::timeToString( duration ) ), 0, 0, 0 ); @@ -243,6 +243,16 @@ PlaylistLargeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& drawRichText( painter, option, leftRect, Qt::AlignBottom, textDoc ); + if ( !q->results().isEmpty() && !q->results().first()->sourceIcon().isNull() ) + { + const int iconSize = avatarRect.width() - 4; + const QPixmap sourceIcon = q->results().first()->sourceIcon( QSize( iconSize, iconSize ) ); + painter->setOpacity( 0.8 ); + painter->drawPixmap( QRect( rightRect.right() - iconSize, r.center().y() - iconSize/2, iconSize, iconSize ), sourceIcon ); + painter->setOpacity( 1. ); + rightRect.moveLeft( rightRect.left() - iconSize - 8 ); + } + if ( duration > 0 ) { painter->setPen( opt.palette.text().color() );