Added to display a default Album Thumbnail, when Album has no Thumbnail ( temporary solution )

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5872 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2012-11-22 11:52:24 +00:00
parent 1513da30b9
commit ffff660bbd
5 changed files with 22 additions and 3 deletions

View File

@ -38,7 +38,16 @@ void AlbumDialog::setUp()
QPixmap qtn;
qtn.loadFromData(mAlbum.mThumbnail.data, mAlbum.mThumbnail.size, mAlbum.mThumbnail.type.c_str());
if(mAlbum.mThumbnail.size != 0)
{
ui->label_thumbNail->setPixmap(qtn);
}
else
{
// display a default Album icon when album has no Thumbnail
ui->label_thumbNail->setPixmap(QPixmap(":/images/album_default_128.png"));
}
}
void AlbumDialog::updateAlbumPhotos(){

View File

@ -23,7 +23,16 @@ void AlbumItem::setUp()
ui->label_Photographer->setText(QString::fromStdString(mAlbum.mPhotographer));
QPixmap qtn;
qtn.loadFromData(mAlbum.mThumbnail.data, mAlbum.mThumbnail.size, mAlbum.mThumbnail.type.c_str());
if(mAlbum.mThumbnail.size != 0)
{
ui->label_Thumbnail->setPixmap(qtn);
}
else
{
// display a default Album icon when album has no Thumbnail
ui->label_Thumbnail->setPixmap(QPixmap(":/images/album_default_128.png"));
}
}
void AlbumItem::mousePressEvent(QMouseEvent *event)

View File

@ -7,5 +7,6 @@
<file>images/album_subscribe.png</file>
<file>images/album_unsubscribe.png</file>
<file>images/album_create_64.png</file>
<file>images/album_default_128.png</file>
</qresource>
</RCC>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB