1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 12:02:48 +01:00

Make a little border around the moodbars in the playlist

This commit is contained in:
David Sansome 2012-05-30 10:33:15 +01:00
parent 6862a69383
commit 7501d664bf

View File

@ -62,10 +62,12 @@ void MoodbarItemDelegate::paint(
QPixmap pixmap = const_cast<MoodbarItemDelegate*>(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);
}
}