mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-24 08:41:26 -04:00
added to display on New Channel Feed Item Channel logo when available
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2959 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ee1477df10
commit
5df17295b8
2 changed files with 32 additions and 3 deletions
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "rsiface/rschannels.h"
|
||||
|
||||
#define CHAN_DEFAULT_IMAGE ":/images/channels.png"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
/****
|
||||
|
@ -73,6 +75,16 @@ void ChanNewItem::updateItemStatic()
|
|||
nameLabel->setText(QString::fromStdWString(ci.channelName));
|
||||
|
||||
descLabel->setText(QString::fromStdWString(ci.channelDesc));
|
||||
|
||||
if(ci.pngImageLen != 0){
|
||||
|
||||
QPixmap chanImage;
|
||||
chanImage.loadFromData(ci.pngChanImage, ci.pngImageLen, "PNG");
|
||||
logo_label->setPixmap(QPixmap(chanImage));
|
||||
}else{
|
||||
QPixmap defaulImage(CHAN_DEFAULT_IMAGE);
|
||||
logo_label->setPixmap(QPixmap(defaulImage));
|
||||
}
|
||||
|
||||
if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue