Background update imrovements

This commit is contained in:
craig.p.drummond
2014-03-07 17:17:10 +00:00
committed by craig.p.drummond
parent e70e2588ea
commit 0453996eec
2 changed files with 6 additions and 10 deletions

View File

@@ -462,18 +462,14 @@ void ContextWidget::readConfig()
switch (backdropType) {
case PlayQueueView::BI_None:
if (origType!=backdropType && isVisible() && !currentArtist.isEmpty()) {
updateArtist=currentArtist;
currentArtist.clear();
updateBackdrop();
updateBackdrop(true);
QWidget::update();
}
break;
case PlayQueueView::BI_Cover:
if (origType!=backdropType || backdropOpacity!=origOpacity || backdropBlur!=origBlur) {
if (isVisible() && !currentArtist.isEmpty()) {
updateArtist=currentArtist;
currentArtist.clear();
updateBackdrop();
updateBackdrop(true);
QWidget::update();
}
}
@@ -692,10 +688,10 @@ void ContextWidget::cancel()
}
}
void ContextWidget::updateBackdrop()
void ContextWidget::updateBackdrop(bool force)
{
DBUG << updateArtist << currentArtist << currentSong.file;
if (updateArtist==currentArtist) {
DBUG << updateArtist << currentArtist << currentSong.file << force;
if (!force && updateArtist==currentArtist) {
return;
}
currentArtist=updateArtist;