Background update imrovements

This commit is contained in:
craig.p.drummond
2014-03-07 17:17:10 +00:00
parent 1443ad9335
commit 8df3449df8
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;

View File

@@ -131,7 +131,7 @@ private:
void resizeEvent(QResizeEvent *e);
bool eventFilter(QObject *o, QEvent *e);
void cancel();
void updateBackdrop();
void updateBackdrop(bool force=false);
void getBackdrop();
void getFanArtBackdrop();
void getMusicbrainzId(const QString &artist);