diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp index 514ae5fcf..21685d83d 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp @@ -186,7 +186,7 @@ void BoardPostDisplayWidgetBase::setup() QObject::connect(readButton(), SIGNAL(clicked()), this, SLOT(readToggled())); 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); connect(showInPeopleAct, SIGNAL(triggered()), this, SLOT(showAuthorInPeople())); @@ -217,6 +217,7 @@ void BoardPostDisplayWidgetBase::setup() qtime.setTime_t(mPost.mMeta.mPublishTs); QString timestamp = qtime.toString("hh:mm dd-MMM-yyyy"); dateLabel()->setText(timestamp); + pictureLabel()->setDisabled(true); } else { @@ -311,6 +312,11 @@ void BoardPostDisplayWidgetBase::handleShareButtonClicked() { emit shareButtonClicked(); } + +void BoardPostDisplayWidgetBase::handleCopyLinkClicked() +{ + emit copylinkClicked(); +} //=================================================================================================================================== //== class BoardPostDisplayWidget == //=================================================================================================================================== @@ -348,15 +354,15 @@ void BoardPostDisplayWidget_compact::setup() RsReputationLevel overall_reputation = rsReputations->overallReputationLevel(mPost.mMeta.mAuthorId); bool redacted = (overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE); + int desired_height = QFontMetricsF(font()).height() * 5; + ui->pictureLabel->setFixedSize(16/9.0*desired_height,desired_height); + if(redacted) { - ui->pictureLabel->setPicture( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default.png") ); + ui->pictureLabel->setPicture( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-blocked.png") ); } else { - int desired_height = QFontMetricsF(font()).height() * 5; - ui->pictureLabel->setFixedSize(16/9.0*desired_height,desired_height); - if(mPost.mImage.mData != NULL) { QPixmap pixmap; diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h index 03db04970..2016ff678 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h @@ -90,6 +90,8 @@ protected slots: void makeDownVote() ; void setCommentsSize(int comNb) ; void handleShareButtonClicked() ; + void handleCopyLinkClicked() ; + signals: void changeReadStatusRequested(const RsGxsMessageId&,bool); @@ -98,6 +100,7 @@ signals: void commentsRequested(const RsGxsMessageId&,bool); void thumbnailOpenned(); void shareButtonClicked(); + void copylinkClicked(); protected: RsPostedPost mPost; diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_compact.ui b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_compact.ui index 304b3b446..21fa7d87c 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_compact.ui +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_compact.ui @@ -183,6 +183,9 @@ + + 3 + @@ -219,10 +222,13 @@ - 5 + 6 - 0 + 2 + + + 2 6 diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp index d0cb983a7..387b271eb 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp @@ -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(commentsRequested(const RsGxsMessageId&,bool)),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->adjustSize(); @@ -405,6 +406,7 @@ void PostedListWidgetWithModel::copyMessageLink() QList urls; urls.push_back(link); RSLinkClipboard::copyLinks(urls); + QMessageBox::information(NULL,tr("information"),tr("The Retrohare link was copied to your clipboard.")) ; } catch(std::exception& e) { diff --git a/retroshare-gui/src/gui/Posted/Posted_images.qrc b/retroshare-gui/src/gui/Posted/Posted_images.qrc index fab0bae65..72cb3c40c 100644 --- a/retroshare-gui/src/gui/Posted/Posted_images.qrc +++ b/retroshare-gui/src/gui/Posted/Posted_images.qrc @@ -6,6 +6,7 @@ images/up-arrow.png images/comments.png images/comments_blue.png + images/thumb-blocked.png images/thumb-default.png images/thumb-link.png images/share.png diff --git a/retroshare-gui/src/gui/Posted/images/thumb-blocked.png b/retroshare-gui/src/gui/Posted/images/thumb-blocked.png new file mode 100644 index 000000000..3ff44d7fa Binary files /dev/null and b/retroshare-gui/src/gui/Posted/images/thumb-blocked.png differ diff --git a/retroshare-gui/src/gui/gxs/GxsCommentDialog.ui b/retroshare-gui/src/gui/gxs/GxsCommentDialog.ui index e23a16b44..734e490ca 100644 --- a/retroshare-gui/src/gui/gxs/GxsCommentDialog.ui +++ b/retroshare-gui/src/gui/gxs/GxsCommentDialog.ui @@ -7,11 +7,11 @@ 0 0 632 - 547 + 248 - + 0 0 @@ -23,7 +23,7 @@ - + 0 0 diff --git a/retroshare-gui/src/qss/qdarkstyle-v2.qss b/retroshare-gui/src/qss/qdarkstyle-v2.qss index feadf4884..6a86212c5 100644 --- a/retroshare-gui/src/qss/qdarkstyle-v2.qss +++ b/retroshare-gui/src/qss/qdarkstyle-v2.qss @@ -2150,6 +2150,12 @@ BoardPostDisplayWidget_card QFrame#mainFrame[new=true] { background-color: #1464a0; } +BoardPostDisplayWidget_compact QLabel#titleLabel, +BoardPostDisplayWidget_card QLabel#titleLabel{ + font-size: 14px; + font: bold; +} + WireGroupItem QFrame#wire_frame{ background: transparent; } diff --git a/retroshare-gui/src/qss/qdarkstyle.qss b/retroshare-gui/src/qss/qdarkstyle.qss index d7e1a38e8..6f8f2a0a7 100644 --- a/retroshare-gui/src/qss/qdarkstyle.qss +++ b/retroshare-gui/src/qss/qdarkstyle.qss @@ -1317,6 +1317,13 @@ BoardPostDisplayWidget_card QLabel#newLabel { color: black; } +BoardPostDisplayWidget_compact QLabel#titleLabel, +BoardPostDisplayWidget_card QLabel#titleLabel{ + font-size: 14px; + font: bold; +} + + WireGroupItem QFrame#wire_frame { border: 1px solid #38444d;