mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
commit
ac6b14540a
@ -186,7 +186,7 @@ void BoardPostDisplayWidgetBase::setup()
|
|||||||
QObject::connect(readButton(), SIGNAL(clicked()), this, SLOT(readToggled()));
|
QObject::connect(readButton(), SIGNAL(clicked()), this, SLOT(readToggled()));
|
||||||
|
|
||||||
QAction *CopyLinkAction = new QAction(QIcon(""),tr("Copy RetroShare Link"), this);
|
QAction *CopyLinkAction = new QAction(QIcon(""),tr("Copy RetroShare Link"), this);
|
||||||
connect(CopyLinkAction, SIGNAL(triggered()), this, SLOT(copyMessageLink()));
|
connect(CopyLinkAction, SIGNAL(triggered()), this, SLOT(handleCopyLinkClicked()));
|
||||||
|
|
||||||
QAction *showInPeopleAct = new QAction(QIcon(), tr("Show author in people tab"), this);
|
QAction *showInPeopleAct = new QAction(QIcon(), tr("Show author in people tab"), this);
|
||||||
connect(showInPeopleAct, SIGNAL(triggered()), this, SLOT(showAuthorInPeople()));
|
connect(showInPeopleAct, SIGNAL(triggered()), this, SLOT(showAuthorInPeople()));
|
||||||
@ -217,6 +217,7 @@ void BoardPostDisplayWidgetBase::setup()
|
|||||||
qtime.setTime_t(mPost.mMeta.mPublishTs);
|
qtime.setTime_t(mPost.mMeta.mPublishTs);
|
||||||
QString timestamp = qtime.toString("hh:mm dd-MMM-yyyy");
|
QString timestamp = qtime.toString("hh:mm dd-MMM-yyyy");
|
||||||
dateLabel()->setText(timestamp);
|
dateLabel()->setText(timestamp);
|
||||||
|
pictureLabel()->setDisabled(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -311,6 +312,11 @@ void BoardPostDisplayWidgetBase::handleShareButtonClicked()
|
|||||||
{
|
{
|
||||||
emit shareButtonClicked();
|
emit shareButtonClicked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BoardPostDisplayWidgetBase::handleCopyLinkClicked()
|
||||||
|
{
|
||||||
|
emit copylinkClicked();
|
||||||
|
}
|
||||||
//===================================================================================================================================
|
//===================================================================================================================================
|
||||||
//== class BoardPostDisplayWidget ==
|
//== class BoardPostDisplayWidget ==
|
||||||
//===================================================================================================================================
|
//===================================================================================================================================
|
||||||
@ -348,15 +354,15 @@ void BoardPostDisplayWidget_compact::setup()
|
|||||||
RsReputationLevel overall_reputation = rsReputations->overallReputationLevel(mPost.mMeta.mAuthorId);
|
RsReputationLevel overall_reputation = rsReputations->overallReputationLevel(mPost.mMeta.mAuthorId);
|
||||||
bool redacted = (overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE);
|
bool redacted = (overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE);
|
||||||
|
|
||||||
if(redacted)
|
|
||||||
{
|
|
||||||
ui->pictureLabel->setPicture( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default.png") );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int desired_height = QFontMetricsF(font()).height() * 5;
|
int desired_height = QFontMetricsF(font()).height() * 5;
|
||||||
ui->pictureLabel->setFixedSize(16/9.0*desired_height,desired_height);
|
ui->pictureLabel->setFixedSize(16/9.0*desired_height,desired_height);
|
||||||
|
|
||||||
|
if(redacted)
|
||||||
|
{
|
||||||
|
ui->pictureLabel->setPicture( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-blocked.png") );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if(mPost.mImage.mData != NULL)
|
if(mPost.mImage.mData != NULL)
|
||||||
{
|
{
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
@ -90,6 +90,8 @@ protected slots:
|
|||||||
void makeDownVote() ;
|
void makeDownVote() ;
|
||||||
void setCommentsSize(int comNb) ;
|
void setCommentsSize(int comNb) ;
|
||||||
void handleShareButtonClicked() ;
|
void handleShareButtonClicked() ;
|
||||||
|
void handleCopyLinkClicked() ;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void changeReadStatusRequested(const RsGxsMessageId&,bool);
|
void changeReadStatusRequested(const RsGxsMessageId&,bool);
|
||||||
@ -98,6 +100,7 @@ signals:
|
|||||||
void commentsRequested(const RsGxsMessageId&,bool);
|
void commentsRequested(const RsGxsMessageId&,bool);
|
||||||
void thumbnailOpenned();
|
void thumbnailOpenned();
|
||||||
void shareButtonClicked();
|
void shareButtonClicked();
|
||||||
|
void copylinkClicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RsPostedPost mPost;
|
RsPostedPost mPost;
|
||||||
|
@ -183,6 +183,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="StyledLabel" name="titleLabel">
|
<widget class="StyledLabel" name="titleLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -219,10 +222,13 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>5</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
|
@ -205,6 +205,7 @@ QWidget *PostedPostDelegate::createEditor(QWidget *parent, const QStyleOptionVie
|
|||||||
QObject::connect(w,SIGNAL(expand(RsGxsMessageId,bool)),this,SLOT(markCurrentPostAsRead()));
|
QObject::connect(w,SIGNAL(expand(RsGxsMessageId,bool)),this,SLOT(markCurrentPostAsRead()));
|
||||||
QObject::connect(w,SIGNAL(commentsRequested(const RsGxsMessageId&,bool)),mPostListWidget,SLOT(markCurrentPostAsRead()));
|
QObject::connect(w,SIGNAL(commentsRequested(const RsGxsMessageId&,bool)),mPostListWidget,SLOT(markCurrentPostAsRead()));
|
||||||
QObject::connect(w,SIGNAL(shareButtonClicked()),mPostListWidget,SLOT(markCurrentPostAsRead()));
|
QObject::connect(w,SIGNAL(shareButtonClicked()),mPostListWidget,SLOT(markCurrentPostAsRead()));
|
||||||
|
QObject::connect(w,SIGNAL(copylinkClicked()),mPostListWidget,SLOT(copyMessageLink()));
|
||||||
|
|
||||||
w->setFixedSize(option.rect.size());
|
w->setFixedSize(option.rect.size());
|
||||||
w->adjustSize();
|
w->adjustSize();
|
||||||
@ -405,6 +406,7 @@ void PostedListWidgetWithModel::copyMessageLink()
|
|||||||
QList<RetroShareLink> urls;
|
QList<RetroShareLink> urls;
|
||||||
urls.push_back(link);
|
urls.push_back(link);
|
||||||
RSLinkClipboard::copyLinks(urls);
|
RSLinkClipboard::copyLinks(urls);
|
||||||
|
QMessageBox::information(NULL,tr("information"),tr("The Retrohare link was copied to your clipboard.")) ;
|
||||||
}
|
}
|
||||||
catch(std::exception& e)
|
catch(std::exception& e)
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<file>images/up-arrow.png</file>
|
<file>images/up-arrow.png</file>
|
||||||
<file>images/comments.png</file>
|
<file>images/comments.png</file>
|
||||||
<file>images/comments_blue.png</file>
|
<file>images/comments_blue.png</file>
|
||||||
|
<file>images/thumb-blocked.png</file>
|
||||||
<file>images/thumb-default.png</file>
|
<file>images/thumb-default.png</file>
|
||||||
<file>images/thumb-link.png</file>
|
<file>images/thumb-link.png</file>
|
||||||
<file>images/share.png</file>
|
<file>images/share.png</file>
|
||||||
|
BIN
retroshare-gui/src/gui/Posted/images/thumb-blocked.png
Normal file
BIN
retroshare-gui/src/gui/Posted/images/thumb-blocked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
@ -7,11 +7,11 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>632</width>
|
<width>632</width>
|
||||||
<height>547</height>
|
<height>248</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="GxsCommentTreeWidget" name="treeWidget">
|
<widget class="GxsCommentTreeWidget" name="treeWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -2150,6 +2150,12 @@ BoardPostDisplayWidget_card QFrame#mainFrame[new=true] {
|
|||||||
background-color: #1464a0;
|
background-color: #1464a0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BoardPostDisplayWidget_compact QLabel#titleLabel,
|
||||||
|
BoardPostDisplayWidget_card QLabel#titleLabel{
|
||||||
|
font-size: 14px;
|
||||||
|
font: bold;
|
||||||
|
}
|
||||||
|
|
||||||
WireGroupItem QFrame#wire_frame{
|
WireGroupItem QFrame#wire_frame{
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
@ -1317,6 +1317,13 @@ BoardPostDisplayWidget_card QLabel#newLabel {
|
|||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BoardPostDisplayWidget_compact QLabel#titleLabel,
|
||||||
|
BoardPostDisplayWidget_card QLabel#titleLabel{
|
||||||
|
font-size: 14px;
|
||||||
|
font: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
WireGroupItem QFrame#wire_frame
|
WireGroupItem QFrame#wire_frame
|
||||||
{
|
{
|
||||||
border: 1px solid #38444d;
|
border: 1px solid #38444d;
|
||||||
|
Loading…
Reference in New Issue
Block a user