mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 09:34:10 -05:00
Fxed to get work Copy RetroShare Link
*Fxed to get work Copy RetroShare Link *Fxing margins for compact ui *Fixing darkstylsheets
This commit is contained in:
parent
e1ca1e137c
commit
d122b3f1e5
5 changed files with 40 additions and 2 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
|
@ -27,6 +28,7 @@
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
#include "BoardPostDisplayWidget.h"
|
#include "BoardPostDisplayWidget.h"
|
||||||
#include "PhotoView.h"
|
#include "PhotoView.h"
|
||||||
|
#include "gui/RetroShareLink.h"
|
||||||
#include "gui/gxs/GxsIdDetails.h"
|
#include "gui/gxs/GxsIdDetails.h"
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
#include "gui/common/FilesDefs.h"
|
#include "gui/common/FilesDefs.h"
|
||||||
|
|
@ -165,6 +167,22 @@ void BoardPostDisplayWidgetBase::showAuthorInPeople()
|
||||||
idDialog->navigate(RsGxsId(mPost.mMeta.mAuthorId));
|
idDialog->navigate(RsGxsId(mPost.mMeta.mAuthorId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BoardPostDisplayWidgetBase::copyMessageLink()
|
||||||
|
{
|
||||||
|
if (mPost.mMeta.mGroupId.isNull() || mPost.mMeta.mMsgId.isNull()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RetroShareLink link = RetroShareLink::createGxsMessageLink(RetroShareLink::TYPE_POSTED, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, QString::fromUtf8(mPost.mMeta.mMsgName.c_str()));
|
||||||
|
|
||||||
|
if (link.valid()) {
|
||||||
|
QList<RetroShareLink> urls;
|
||||||
|
urls.push_back(link);
|
||||||
|
RSLinkClipboard::copyLinks(urls);
|
||||||
|
QMessageBox::information(NULL,tr("information"),tr("The Retrohare link was copied to your clipboard.")) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BoardPostDisplayWidgetBase::setup()
|
void BoardPostDisplayWidgetBase::setup()
|
||||||
{
|
{
|
||||||
// show/hide things based on the view type
|
// show/hide things based on the view type
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ protected slots:
|
||||||
|
|
||||||
void loadComments(bool e);
|
void loadComments(bool e);
|
||||||
void showAuthorInPeople();
|
void showAuthorInPeople();
|
||||||
|
void copyMessageLink();
|
||||||
void readToggled();
|
void readToggled();
|
||||||
void setReadStatus(bool isNew, bool isUnread) ;
|
void setReadStatus(bool isNew, bool isUnread) ;
|
||||||
void makeUpVote() ;
|
void makeUpVote() ;
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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…
Add table
Add a link
Reference in a new issue