From 7501d664bf4e29fdfe268cb3497460d819037763 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Wed, 30 May 2012 10:33:15 +0100 Subject: [PATCH] Make a little border around the moodbars in the playlist --- src/moodbar/moodbaritemdelegate.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/moodbar/moodbaritemdelegate.cpp b/src/moodbar/moodbaritemdelegate.cpp index 8e24517b9..2f83518f4 100644 --- a/src/moodbar/moodbaritemdelegate.cpp +++ b/src/moodbar/moodbaritemdelegate.cpp @@ -62,10 +62,12 @@ void MoodbarItemDelegate::paint( QPixmap pixmap = const_cast(this)->PixmapForIndex( index, option.rect.size()); + drawBackground(painter, option, index); + if (!pixmap.isNull()) { - painter->drawPixmap(option.rect, pixmap); - } else { - drawBackground(painter, option, index); + // Make a little border for the moodbar + const QRect moodbar_rect(option.rect.adjusted(1, 1, -1, -1)); + painter->drawPixmap(moodbar_rect, pixmap); } }