mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
1513da30b9
commit
ffff660bbd
@ -38,8 +38,17 @@ void AlbumDialog::setUp()
|
|||||||
|
|
||||||
QPixmap qtn;
|
QPixmap qtn;
|
||||||
qtn.loadFromData(mAlbum.mThumbnail.data, mAlbum.mThumbnail.size, mAlbum.mThumbnail.type.c_str());
|
qtn.loadFromData(mAlbum.mThumbnail.data, mAlbum.mThumbnail.size, mAlbum.mThumbnail.type.c_str());
|
||||||
|
|
||||||
|
if(mAlbum.mThumbnail.size != 0)
|
||||||
|
{
|
||||||
ui->label_thumbNail->setPixmap(qtn);
|
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(){
|
void AlbumDialog::updateAlbumPhotos(){
|
||||||
|
|
||||||
|
@ -23,8 +23,17 @@ void AlbumItem::setUp()
|
|||||||
ui->label_Photographer->setText(QString::fromStdString(mAlbum.mPhotographer));
|
ui->label_Photographer->setText(QString::fromStdString(mAlbum.mPhotographer));
|
||||||
QPixmap qtn;
|
QPixmap qtn;
|
||||||
qtn.loadFromData(mAlbum.mThumbnail.data, mAlbum.mThumbnail.size, mAlbum.mThumbnail.type.c_str());
|
qtn.loadFromData(mAlbum.mThumbnail.data, mAlbum.mThumbnail.size, mAlbum.mThumbnail.type.c_str());
|
||||||
|
|
||||||
|
if(mAlbum.mThumbnail.size != 0)
|
||||||
|
{
|
||||||
ui->label_Thumbnail->setPixmap(qtn);
|
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)
|
void AlbumItem::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
|
@ -7,5 +7,6 @@
|
|||||||
<file>images/album_subscribe.png</file>
|
<file>images/album_subscribe.png</file>
|
||||||
<file>images/album_unsubscribe.png</file>
|
<file>images/album_unsubscribe.png</file>
|
||||||
<file>images/album_create_64.png</file>
|
<file>images/album_create_64.png</file>
|
||||||
|
<file>images/album_default_128.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
BIN
retroshare-gui/src/gui/PhotoShare/images/album_default_128.png
Normal file
BIN
retroshare-gui/src/gui/PhotoShare/images/album_default_128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue
Block a user