fixed default flags/picture on channel post creation

This commit is contained in:
csoler 2020-09-04 15:15:45 +02:00
parent ab9507c80a
commit 80875dddd7
3 changed files with 8 additions and 4 deletions

View File

@ -81,7 +81,10 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
generateSpinBox->setEnabled(false); generateSpinBox->setEnabled(false);
thumbNailCb->setVisible(false); preview_W->setPixmap(FilesDefs::getPixmapFromQtResourcePath(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE));
preview_W->setText("[Text preview]");
thumbNailCb->setVisible(false);
thumbNailCb->setEnabled(false); thumbNailCb->setEnabled(false);
#ifdef CHANNELS_FRAME_CATCHER #ifdef CHANNELS_FRAME_CATCHER
fCatcher = new framecatcher(); fCatcher = new framecatcher();

View File

@ -25,7 +25,7 @@
#include "gui/gxschannels/GxsChannelPostThumbnail.h" #include "gui/gxschannels/GxsChannelPostThumbnail.h"
ChannelPostThumbnailView::ChannelPostThumbnailView(const RsGxsChannelPost& post,uint32_t flags,QWidget *parent) ChannelPostThumbnailView::ChannelPostThumbnailView(const RsGxsChannelPost& post,uint32_t flags,QWidget *parent)
: QWidget(parent),mFlags(flags) : QWidget(parent),mFlags(flags),mPostTitle(nullptr)
{ {
// now fill the data // now fill the data

View File

@ -85,7 +85,7 @@ public:
static constexpr char *CHAN_DEFAULT_IMAGE = ":images/thumb-default-video.png"; static constexpr char *CHAN_DEFAULT_IMAGE = ":images/thumb-default-video.png";
virtual ~ChannelPostThumbnailView(); virtual ~ChannelPostThumbnailView();
ChannelPostThumbnailView(QWidget *parent=NULL,uint32_t flags=FLAG_ALLOW_PAN); ChannelPostThumbnailView(QWidget *parent=NULL,uint32_t flags=FLAG_ALLOW_PAN | FLAG_SHOW_TEXT);
ChannelPostThumbnailView(const RsGxsChannelPost& post,uint32_t flags,QWidget *parent=NULL); ChannelPostThumbnailView(const RsGxsChannelPost& post,uint32_t flags,QWidget *parent=NULL);
void init(const RsGxsChannelPost& post); void init(const RsGxsChannelPost& post);
@ -101,7 +101,8 @@ public:
else else
ss =s; ss =s;
mPostTitle->setText(ss); if(mPostTitle != NULL)
mPostTitle->setText(ss);
} }
private: private: