mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
Draw a background in the playlist when there isn't a moodbar
This commit is contained in:
parent
74a83a2f7c
commit
37df0ec0b6
@ -44,8 +44,11 @@ void MoodbarItemDelegate::paint(
|
|||||||
const QModelIndex& index) const {
|
const QModelIndex& index) const {
|
||||||
QPixmap pixmap = const_cast<MoodbarItemDelegate*>(this)->PixmapForIndex(
|
QPixmap pixmap = const_cast<MoodbarItemDelegate*>(this)->PixmapForIndex(
|
||||||
index, option.rect.size());
|
index, option.rect.size());
|
||||||
|
|
||||||
if (!pixmap.isNull()) {
|
if (!pixmap.isNull()) {
|
||||||
painter->drawPixmap(option.rect, pixmap);
|
painter->drawPixmap(option.rect, pixmap);
|
||||||
|
} else {
|
||||||
|
drawBackground(painter, option, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user