mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 08:59:50 -05:00
Added a "Remove Thumbnail" button to remove a unwanted Thumbnail from the post easy & fast.
This commit is contained in:
parent
b900a79448
commit
1bf251f8f7
@ -88,6 +88,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
||||
attachmentsButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/attachements.png"));
|
||||
addThumbnailButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-image.png"));
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
removeButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/mail/delete.png")));
|
||||
|
||||
aspectRatio_CB->setItemIcon(0,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-auto.svg"));
|
||||
aspectRatio_CB->setItemIcon(1,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-1-1.svg"));
|
||||
@ -116,6 +117,8 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
||||
generateSpinBox->hide();
|
||||
#endif
|
||||
|
||||
removeButton->hide();
|
||||
|
||||
/* load settings */
|
||||
processSettings(true);
|
||||
}
|
||||
@ -826,8 +829,8 @@ void CreateGxsChannelMsg::addThumbnail()
|
||||
picture = img;
|
||||
|
||||
// to show the selected
|
||||
preview_W->setPixmap(picture, aspectRatio_CB->currentIndex()==0);
|
||||
|
||||
preview_W->setPixmap(picture, aspectRatio_CB->currentIndex()==0);
|
||||
removeButton->show();
|
||||
}
|
||||
|
||||
void CreateGxsChannelMsg::loadOriginalChannelPostInfo()
|
||||
@ -871,7 +874,8 @@ void CreateGxsChannelMsg::loadOriginalChannelPostInfo()
|
||||
if(post.mThumbnail.mData != NULL)
|
||||
{
|
||||
GxsIdDetails::loadPixmapFromData(post.mThumbnail.mData,post.mThumbnail.mSize,picture,GxsIdDetails::ORIGINAL);
|
||||
preview_W->setPixmap(picture,true);
|
||||
preview_W->setPixmap(picture,true);
|
||||
removeButton->show();
|
||||
}
|
||||
|
||||
|
||||
@ -947,3 +951,9 @@ void CreateGxsChannelMsg::toggle()
|
||||
}
|
||||
}
|
||||
|
||||
void CreateGxsChannelMsg::on_removeButton_clicked()
|
||||
{
|
||||
preview_W->setPixmap(FilesDefs::getPixmapFromQtResourcePath(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE),true);
|
||||
removeButton->hide();
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,7 @@ private slots:
|
||||
|
||||
void on_channelpostButton_clicked();
|
||||
void on_attachmentsButton_clicked();
|
||||
void on_removeButton_clicked();
|
||||
private:
|
||||
void processSettings(bool load);
|
||||
void loadChannelInfo();
|
||||
|
@ -240,6 +240,19 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Remove Thumbnail</p></body></html></string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
Loading…
Reference in New Issue
Block a user