Handle updating background in playqueueview class

This commit is contained in:
craig.p.drummond
2014-03-07 17:17:56 +00:00
parent 8df3449df8
commit 3f0aefe0c4
3 changed files with 10 additions and 7 deletions

View File

@@ -129,7 +129,7 @@ PlayQueueView::~PlayQueueView()
{
}
bool PlayQueueView::readConfig()
void PlayQueueView::readConfig()
{
int origOpacity=backgroundOpacity;
int origBlur=backgroundBlur;
@@ -150,13 +150,19 @@ bool PlayQueueView::readConfig()
curentCover=QImage();
curentBackground=QPixmap();
view()->viewport()->update();
if (!CurrentCover::self()->image().isNull()) {
setImage(CurrentCover::self()->image());
}
}
break;
case BI_Cover:
if (BI_None==origType) {
updatePalette();
}
return origType!=backgroundImageType || backgroundOpacity!=origOpacity || backgroundBlur!=origBlur;
if ((origType!=backgroundImageType || backgroundOpacity!=origOpacity || backgroundBlur!=origBlur) && !CurrentCover::self()->image().isNull()) {
setImage(CurrentCover::self()->image());
}
break;
case BI_Custom:
if (BI_None==origType) {
updatePalette();
@@ -166,7 +172,6 @@ bool PlayQueueView::readConfig()
}
break;
}
return false;
}
void PlayQueueView::saveConfig()