1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-17 19:37:09 +02:00

show user-avatar fallback if no avatar was found

This commit is contained in:
Kilian Lackhove
2012-09-12 16:30:55 +02:00
parent 20fd231e54
commit 371d787b46

View File

@@ -28,6 +28,7 @@
#include "database/DatabaseCommand_AllTracks.h"
#include "database/DatabaseCommand_AddFiles.h"
#include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h"
using namespace Tomahawk;
@@ -304,7 +305,12 @@ Result::sourceIcon() const
}
else
{
return collection()->source()->avatar( Source::FancyStyle );
QPixmap avatar = collection()->source()->avatar( Source::FancyStyle );
if ( !avatar )
{
avatar = TomahawkUtils::createAvatarFrame( QPixmap( RESPATH "images/user-avatar.png" ) );
}
return avatar;
}
}