diff --git a/libretroshare/src/retroshare/rsposted.h b/libretroshare/src/retroshare/rsposted.h index 60b510d55..93f69201e 100644 --- a/libretroshare/src/retroshare/rsposted.h +++ b/libretroshare/src/retroshare/rsposted.h @@ -25,10 +25,12 @@ #include #include #include +#include #include "retroshare/rstokenservice.h" #include "retroshare/rsgxsifacehelper.h" #include "retroshare/rsgxscommon.h" +#include "serialiser/rsserializable.h" /* The Main Interface Class - for information about your Posted */ class RsPosted; @@ -42,6 +44,7 @@ class RsPostedGroup RsGroupMetaData mMeta; std::string mDescription; + }; @@ -52,7 +55,7 @@ class RsPostedGroup #define RSPOSTED_PERIOD_YEAR 1 #define RSPOSTED_PERIOD_MONTH 2 #define RSPOSTED_PERIOD_WEEK 3 -#define RSPOSTED_PERIOD_DAY 4 +#define RSPOSTED_PERIOD_DAY 4 #define RSPOSTED_PERIOD_HOUR 5 #define RSPOSTED_VIEWMODE_LATEST 1 @@ -102,7 +105,6 @@ virtual bool updateGroup(uint32_t &token, RsPostedGroup &group) = 0; }; - class RsPostedPost { public: @@ -137,6 +139,24 @@ class RsPostedPost double mHotScore; double mTopScore; double mNewScore; + + RsGxsImage mImage; + + /// @see RsSerializable + /*virtual void serial_process( RsGenericSerializer::SerializeJob j, + RsGenericSerializer::SerializeContext& ctx ) + { + RS_SERIAL_PROCESS(mImage); + RS_SERIAL_PROCESS(mMeta); + RS_SERIAL_PROCESS(mLink); + RS_SERIAL_PROCESS(mHaveVoted); + RS_SERIAL_PROCESS(mUpVotes); + RS_SERIAL_PROCESS(mDownVotes); + RS_SERIAL_PROCESS(mComments); + RS_SERIAL_PROCESS(mHotScore); + RS_SERIAL_PROCESS(mTopScore); + RS_SERIAL_PROCESS(mNewScore); + }*/ }; diff --git a/libretroshare/src/rsitems/rsposteditems.cc b/libretroshare/src/rsitems/rsposteditems.cc index 67a5a9873..81455f284 100644 --- a/libretroshare/src/rsitems/rsposteditems.cc +++ b/libretroshare/src/rsitems/rsposteditems.cc @@ -22,15 +22,18 @@ #include "rsitems/rsposteditems.h" #include "serialiser/rstypeserializer.h" + + void RsGxsPostedPostItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx) { RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_LINK,mPost.mLink,"mPost.mLink") ; RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_MSG ,mPost.mNotes,"mPost.mNotes") ; + RsTypeSerializer::serial_process(j,ctx,mImage,"mImage") ; } void RsGxsPostedGroupItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx) { - RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR ,mGroup.mDescription,"mGroup.mDescription") ; + RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR ,mGroup.mDescription,"mGroup.mDescription") ; } RsItem *RsGxsPostedSerialiser::create_item(uint16_t service_id,uint8_t item_subtype) const @@ -47,12 +50,54 @@ RsItem *RsGxsPostedSerialiser::create_item(uint16_t service_id,uint8_t item_subt } } +bool RsGxsPostedPostItem::fromPostedPost(RsPostedPost &post, bool moveImage) +{ + clear(); + + mPost = post; + meta = post.mMeta; + + if (moveImage) + { + mImage.binData.bin_data = post.mImage.mData; + mImage.binData.bin_len = post.mImage.mSize; + post.mImage.shallowClear(); + } + else + { + mImage.binData.setBinData(post.mImage.mData, post.mImage.mSize); + } + + return true; +} + +bool RsGxsPostedPostItem::toPostedPost(RsPostedPost &post, bool moveImage) +{ + post = mPost; + post.mMeta = meta; + + if (moveImage) + { + post.mImage.take((uint8_t *) mImage.binData.bin_data, mImage.binData.bin_len); + // mImage doesn't have a ShallowClear at the moment! + mImage.binData.TlvShallowClear(); + } + else + { + post.mImage.copy((uint8_t *) mImage.binData.bin_data, mImage.binData.bin_len); + } + + return true; +} + void RsGxsPostedPostItem::clear() { mPost.mLink.clear(); mPost.mNotes.clear(); + mImage.TlvClear(); } void RsGxsPostedGroupItem::clear() { mGroup.mDescription.clear(); } + diff --git a/libretroshare/src/rsitems/rsposteditems.h b/libretroshare/src/rsitems/rsposteditems.h index 62ab7a6af..ef88289b5 100644 --- a/libretroshare/src/rsitems/rsposteditems.h +++ b/libretroshare/src/rsitems/rsposteditems.h @@ -25,6 +25,7 @@ #include "rsitems/rsserviceids.h" #include "rsitems/rsgxscommentitems.h" #include "rsitems/rsgxsitems.h" +#include "serialiser/rstlvimage.h" #include "retroshare/rsposted.h" @@ -38,9 +39,12 @@ public: virtual ~RsGxsPostedGroupItem() {} void clear(); + virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx); - + RsPostedGroup mGroup; + + }; class RsGxsPostedPostItem : public RsGxsMsgItem @@ -51,8 +55,14 @@ public: void clear(); virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx); + + // Slightly unusual structure. + // use conversion functions to transform: + bool fromPostedPost(RsPostedPost &post, bool moveImage); + bool toPostedPost(RsPostedPost &post, bool moveImage); RsPostedPost mPost; + RsTlvImage mImage; }; class RsGxsPostedSerialiser : public RsGxsCommentSerialiser diff --git a/libretroshare/src/services/p3posted.cc b/libretroshare/src/services/p3posted.cc index 4e8ddacf2..d50c0624c 100644 --- a/libretroshare/src/services/p3posted.cc +++ b/libretroshare/src/services/p3posted.cc @@ -123,6 +123,7 @@ bool p3Posted::getPostData(const uint32_t &token, std::vector &msg { RsPostedPost msg = postItem->mPost; msg.mMeta = postItem->meta; + postItem->toPostedPost(msg, true); msg.calculateScores(now); msgs.push_back(msg); @@ -291,8 +292,10 @@ bool p3Posted::createPost(uint32_t &token, RsPostedPost &msg) std::cerr << std::endl; RsGxsPostedPostItem* msgItem = new RsGxsPostedPostItem(); - msgItem->mPost = msg; - msgItem->meta = msg.mMeta; + //msgItem->mPost = msg; + //msgItem->meta = msg.mMeta; + msgItem->fromPostedPost(msg, true); + RsGenExchange::publishMsg(token, msgItem); return true; diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp index ba622ed17..cd21d3b6c 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp @@ -18,13 +18,16 @@ * * *******************************************************************************/ + #include #include #include "PostedCreatePostDialog.h" #include "ui_PostedCreatePostDialog.h" +#include "util/misc.h" #include "util/TokenQueue.h" #include "gui/settings/rsharesettings.h" +#include #include @@ -37,6 +40,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos Settings->loadWidgetInformation(this); connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost())); connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); + connect(ui->pushButton, SIGNAL(clicked() ), this , SLOT(addPicture())); ui->headerFrame->setHeaderImage(QPixmap(":/images/posted_64.png")); ui->headerFrame->setHeaderText(tr("Submit a new Post")); @@ -78,6 +82,18 @@ void PostedCreatePostDialog::createPost() post.mMeta.mMsgName = std::string(ui->titleEdit->text().toUtf8()); post.mMeta.mAuthorId = authorId; + QByteArray ba; + QBuffer buffer(&ba); + + if(!picture.isNull()) + { + // send posted image + + buffer.open(QIODevice::WriteOnly); + picture.save(&buffer, "PNG"); // writes image into ba in PNG format + post.mImage.copy((uint8_t *) ba.data(), ba.size()); + } + if(ui->titleEdit->text().isEmpty()) { /* error message */ QMessageBox::warning(this, "RetroShare", tr("Please add a Title"), QMessageBox::Ok, QMessageBox::Ok); @@ -90,3 +106,16 @@ void PostedCreatePostDialog::createPost() accept(); } + +void PostedCreatePostDialog::addPicture() +{ + QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load thumbnail picture"), 800, 600); + + if (img.isNull()) + return; + + picture = img; + + // to show the selected + ui->imageLabel->setPixmap(picture); +} \ No newline at end of file diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h index f4b6c96a3..587b3f957 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h @@ -41,9 +41,13 @@ public: */ explicit PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted* posted, const RsGxsGroupId& grpId, QWidget *parent = 0); ~PostedCreatePostDialog(); + + QPixmap picture; private slots: void createPost(); + void addPicture(); + private: QString mLink; diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui index d8128b199..d9d909887 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui @@ -7,7 +7,7 @@ 0 0 575 - 371 + 467 @@ -47,7 +47,7 @@ QFrame::Raised - + @@ -128,75 +128,108 @@ - - - - - - - - - Title - - - - - - - Link - - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 78 - 17 - - - - - - - - Signed by: - - - - - - - + + + 0 + + + + Picture + + + + + + Qt::Horizontal + + + + 447 + 20 + + + + + + + + Add Picture + + + + + + + Preview + + + + + + + 250 + 200 + + + + + 800 + 200 + + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Notes + + + + + + + + - - - - - - Notes - - - - - - - - - + Qt::Horizontal @@ -209,14 +242,20 @@ - + + + + 0 + 0 + + Submit - + @@ -232,12 +271,51 @@ + + + + + + Title + + + + + + + + + + Link + + + + + + + + + + + + + Post as + + + + + + + StyledLabel + QLabel +
gui/common/StyledLabel.h
+
HeaderFrame QFrame @@ -254,11 +332,6 @@ QComboBox
gui/gxs/GxsIdChooser.h
- - StyledLabel - QLabel -
gui/common/StyledLabel.h
-
diff --git a/retroshare-gui/src/gui/Posted/PostedItem.cpp b/retroshare-gui/src/gui/Posted/PostedItem.cpp index 4304561d7..79db72b32 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.cpp +++ b/retroshare-gui/src/gui/Posted/PostedItem.cpp @@ -24,6 +24,8 @@ #include "rshare.h" #include "PostedItem.h" #include "gui/feeds/FeedHolder.h" +#include "util/misc.h" + #include "ui_PostedItem.h" #include @@ -83,6 +85,7 @@ void PostedItem::setup() ui->fromLabel->clear(); ui->siteLabel->clear(); ui->newCommentLabel->hide(); + ui->frame_picture->hide(); ui->commLabel->hide(); /* general ones */ @@ -94,6 +97,7 @@ void PostedItem::setup() connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments())); connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote())); connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote())); + connect(ui->expandButton, SIGNAL(clicked()), this, SLOT( toggle())); connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool))); @@ -206,7 +210,7 @@ void PostedItem::loadComment(const uint32_t &token) if (comNb == 1) { sComButText = sComButText.append("(1)"); } else if (comNb > 1) { - sComButText = tr("Comments").append("(%1)").arg(comNb); + sComButText = tr("Comments").append(" (%1)").arg(comNb); } ui->commentButton->setText(sComButText); } @@ -219,11 +223,29 @@ void PostedItem::fill() } mInFill = true; + + if(mPost.mImage.mData != NULL) + { + QPixmap pixmap; + pixmap.loadFromData(mPost.mImage.mData, mPost.mImage.mSize, "PNG"); + // Wiping data - as its been passed to thumbnail. + + QPixmap sqpixmap = pixmap.scaled(800, 600, Qt::KeepAspectRatio, Qt::SmoothTransformation); + ui->pictureLabel->setPixmap(sqpixmap); + + ui->thumbnailLabel->setPixmap(pixmap); + }else + { + ui->expandButton->setDisabled(true); + } QDateTime qtime; qtime.setTime_t(mPost.mMeta.mPublishTs); QString timestamp = qtime.toString("hh:mm dd-MMM-yyyy"); - ui->dateLabel->setText(timestamp); + QString timestamp2 = misc::timeRelativeToNow(mPost.mMeta.mPublishTs); + ui->dateLabel->setText(timestamp2); + ui->dateLabel->setToolTip(timestamp); + ui->fromLabel->setId(mPost.mMeta.mAuthorId); // Use QUrl to check/parse our URL @@ -256,9 +278,14 @@ void PostedItem::fill() QString siteurl = url.scheme() + "://" + url.host(); sitestr = QString(" %2 ").arg(siteurl).arg(siteurl); + + ui->titleLabel->setText(urlstr); + }else + { + ui->titleLabel->setText(messageName()); + } - ui->titleLabel->setText(urlstr); ui->siteLabel->setText(sitestr); //QString score = "Hot" + QString::number(post.mHotScore); @@ -451,3 +478,27 @@ void PostedItem::readAndClearItem() readToggled(false); removeItem(); } + +void PostedItem::toggle() +{ + expand(ui->frame_picture->isHidden()); +} + +void PostedItem::doExpand(bool open) +{ + if (open) + { + ui->frame_picture->show(); + ui->expandButton->setIcon(QIcon(QString(":/images/decrease.png"))); + ui->expandButton->setToolTip(tr("Hide")); + } + else + { + ui->frame_picture->hide(); + ui->expandButton->setIcon(QIcon(QString(":/images/expand.png"))); + ui->expandButton->setToolTip(tr("Expand")); + } + + emit sizeChanged(this); + +} diff --git a/retroshare-gui/src/gui/Posted/PostedItem.h b/retroshare-gui/src/gui/Posted/PostedItem.h index 50a200679..7329e3a2e 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.h +++ b/retroshare-gui/src/gui/Posted/PostedItem.h @@ -50,7 +50,7 @@ public: protected: /* FeedItem */ - virtual void doExpand(bool /*open*/) {} + virtual void doExpand(bool open); private slots: void loadComments(); @@ -58,6 +58,7 @@ private slots: void makeDownVote(); void readToggled(bool checked); void readAndClearItem(); + void toggle(); signals: void vote(const RsGxsGrpMsgIdPair& msgId, bool up); diff --git a/retroshare-gui/src/gui/Posted/PostedItem.ui b/retroshare-gui/src/gui/Posted/PostedItem.ui index bebf874c2..aa19e37f5 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.ui +++ b/retroshare-gui/src/gui/Posted/PostedItem.ui @@ -6,15 +6,33 @@ 0 0 - 765 - 230 + 617 + 190
- - + + + + + + 6 + + + 0 + + + 6 + + + 0 + + + 0 + + @@ -23,7 +41,7 @@ - true + false QFrame::Box @@ -31,44 +49,178 @@ QFrame::Sunken - - - - - - 0 - 0 - + + + 0 + + + 0 + + + 0 + + + 0 + + + 6 + + + + + - - - 75 - true - + + QFrame::NoFrame - - This is a very very very very loooooooooooooooonnnnnnnnnnnnnnnnng title don't you think? Yes it is and should wrap around I hope - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - true + + QFrame::Plain + + + 0 + + + 3 + + + 3 + + + 3 + + + 3 + + + + + + 0 + 0 + + + + + 24 + 24 + + + + Vote up + + + + + + + :/images/up-arrow.png:/images/up-arrow.png + + + + 16 + 16 + + + + true + + + + + + + 0 + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Vote down + + + \/ + + + + :/images/down-arrow.png:/images/down-arrow.png + + + + 16 + 16 + + + + true + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 5 + + + + + - - + + - 0 + 6 - + + + + 100 + 75 + + + + + 100 + 75 + + + + + + + QFrame::NoFrame + - New Comment: + + + + :/images/thumb-default.png true @@ -76,255 +228,392 @@ - - - Comment Value - - - - - - - - - - - 0 - - - Qt::AlignCenter - - - - - - - - 24 - 24 - - - - Vote up - - - - - - - :/images/vote_up.png:/images/vote_up.png - - - - - - - - 24 - 24 - - - - Vote down - - - \/ - - - - :/images/vote_down.png:/images/vote_down.png - - - - - - - - 24 - 16777215 - - - - Qt::NoFocus - - - Toggle Message Read Status - - - - :/images/message-state-unread.png:/images/message-state-unread.png - - - true - - - false - - - false - - - - - - - New - - - - - - - Comments - - - - - - - - 0 - 0 - - - - You eyes only - - - true - - - - - - - - 0 - 0 - - - - - 75 - true - - - - By - - - - - - - - 0 - 0 - - - - Signed by - - - true - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Site - - - - - - - - 0 - 0 - - - - Signed by - - - true - - - - - + - Qt::Horizontal + Qt::Vertical - 118 - 20 + 50 + 5 + + + + + + 6 + - - - - 24 - 16777215 - + + + + 0 + 0 + - - Qt::NoFocus + + + 75 + true + - - Set as read and remove item + + This is a very very very very loooooooooooooooonnnnnnnnnnnnnnnnng title don't you think? Yes it is and should wrap around I hope - - - :/images/cancel.png:/images/cancel.png + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + true - - - - 24 - 16777215 - + + + 0 - - Qt::NoFocus + + + + New Comment: + + + true + + + + + + + Comment Value + + + + + + + + + + + 0 + + + QLayout::SetDefaultConstraint + + + + + 3 - - Remove Item + + 0 - - - :/images/close_normal.png:/images/close_normal.png + + 6 - + + + + + 0 + 0 + + + + + 75 + true + + + + Posted by + + + + + + + + 0 + 0 + + + + Signed by + + + true + + + + + + + + 0 + 0 + + + + You eyes only + + + true + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Site + + + + + + + + 0 + 0 + + + + site + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 70 + 20 + + + + + + + + + + 0 + + + 3 + + + + + + + + + :/images/expand.png:/images/expand.png + + + true + + + + + + + + 24 + 16777215 + + + + Qt::NoFocus + + + Toggle Message Read Status + + + + :/images/message-state-unread.png:/images/message-state-unread.png + + + true + + + false + + + true + + + + + + + New + + + + + + + Comments + + + + :/images/comments.png:/images/comments.png + + + Qt::ToolButtonTextBesideIcon + + + true + + + + + + + Qt::Horizontal + + + + 118 + 20 + + + + + + + + + 24 + 16777215 + + + + Qt::NoFocus + + + Set as read and remove item + + + + :/images/cancel.png:/images/cancel.png + + + + + + + + 24 + 16777215 + + + + Qt::NoFocus + + + Remove Item + + + + :/images/close_normal.png:/images/close_normal.png + + + + - titleLabel - + + + + + 800 + 600 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + Qt::Horizontal + + + + 257 + 20 + + + + + + + + TextLabel + + + true + + + + + + + Qt::Horizontal + + + + 257 + 20 + + + + + + + + QFrame::NoFrame @@ -333,7 +622,16 @@ QFrame::Sunken - + + 1 + + + 1 + + + 1 + + 1 @@ -374,6 +672,7 @@ + diff --git a/retroshare-gui/src/gui/Posted/Posted_images.qrc b/retroshare-gui/src/gui/Posted/Posted_images.qrc index 2e9cae6c0..ae7cf9e3b 100644 --- a/retroshare-gui/src/gui/Posted/Posted_images.qrc +++ b/retroshare-gui/src/gui/Posted/Posted_images.qrc @@ -11,5 +11,11 @@ images/hot_24.png images/new_24.png images/posted_32_new.png + images/expand.png + images/decrease.png + images/down-arrow.png + images/up-arrow.png + images/comments.png + images/thumb-default.png diff --git a/retroshare-gui/src/gui/Posted/images/comments.png b/retroshare-gui/src/gui/Posted/images/comments.png new file mode 100644 index 000000000..b7af0d150 Binary files /dev/null and b/retroshare-gui/src/gui/Posted/images/comments.png differ diff --git a/retroshare-gui/src/gui/Posted/images/decrease.png b/retroshare-gui/src/gui/Posted/images/decrease.png new file mode 100644 index 000000000..39e488c17 Binary files /dev/null and b/retroshare-gui/src/gui/Posted/images/decrease.png differ diff --git a/retroshare-gui/src/gui/Posted/images/down-arrow.png b/retroshare-gui/src/gui/Posted/images/down-arrow.png new file mode 100644 index 000000000..b6c7fcc06 Binary files /dev/null and b/retroshare-gui/src/gui/Posted/images/down-arrow.png differ diff --git a/retroshare-gui/src/gui/Posted/images/expand.png b/retroshare-gui/src/gui/Posted/images/expand.png new file mode 100644 index 000000000..66b2f6d0c Binary files /dev/null and b/retroshare-gui/src/gui/Posted/images/expand.png differ diff --git a/retroshare-gui/src/gui/Posted/images/thumb-default.png b/retroshare-gui/src/gui/Posted/images/thumb-default.png new file mode 100644 index 000000000..b52cc1f02 Binary files /dev/null and b/retroshare-gui/src/gui/Posted/images/thumb-default.png differ diff --git a/retroshare-gui/src/gui/Posted/images/up-arrow.png b/retroshare-gui/src/gui/Posted/images/up-arrow.png new file mode 100644 index 000000000..728ccf068 Binary files /dev/null and b/retroshare-gui/src/gui/Posted/images/up-arrow.png differ diff --git a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss index 97e84efc8..e7f489980 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss +++ b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss @@ -119,18 +119,9 @@ GxsCreateCommentDialog QFrame#frame { /* Forums */ -ForumsDialog QLabel#forumName, ForumsDialog QLabel#threadTitle +GxsForumThreadWidget QLabel#forumName { - border: 2px solid #CCCCCC; - border-radius:6px; - background: white; -} - -ForumsDialog2 QLabel#forumName, ForumsDialog2 QLabel#threadTitle -{ - border: 2px solid #CCCCCC; - border-radius:6px; - background: white; + font: bold; } CreateForumMsg > QToolBar#toolBar, CreateForumV2Msg > QToolBar#toolBar { @@ -677,14 +668,6 @@ IdDialog QFrame#inviteFrame { background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2); } -GxsChannelPostsWidget QFrame#infoFrame -{ - border: 1px solid #DCDC41; - border-radius: 6px; - background: #FFFFD7; - background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2); -} - IdEditDialog QLabel#info_label { border: 1px solid #DCDC41; @@ -822,3 +805,109 @@ PostedListWidget QToolButton#submitPostButton { font: bold; font-size: 15px; } + +PostedListWidget QToolButton#subscribeToolButton { + font: bold; + font-size: 15px; + color: white; + background: #0099cc; + border-radius: 4px; +} + +PostedListWidget QToolButton#subscribeToolButton:hover { + background: #03b1f3; + border-radius: 4px; +} + +PostedListWidget QFrame#headerFrame { + background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FEFEFE, stop:1 #E8E8E8); + border: 1px solid #CCCCCC; +} + +GxsForumThreadWidget QToolButton#subscribeToolButton { + font: bold; + font-size: 14px; + color: white; + background: #0099cc; + border-radius: 4px; +} + +GxsForumThreadWidget QToolButton#subscribeToolButton:hover { + background: #03b1f3; + border-radius: 4px; +} + +GxsChannelPostsWidget QFrame#infoFrame +{ + border: 1px solid #DCDC41; + border-radius: 6px; + background: #FFFFD7; + background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2); +} + +GxsChannelPostsWidget QToolButton#subscribeToolButton { + font: bold; + font-size: 14px; + color: white; + background: #0099cc; + border-radius: 4px; +} + +GxsChannelPostsWidget QToolButton#subscribeToolButton:hover { + background: #03b1f3; + border-radius: 4px; +} + +GxsChannelPostsWidget QToolButton#subscribeToolButton:pressed { + background: #03b1f3; + border-radius: 4px; + border: 1px solid gray; +} + +GxsChannelPostsWidget QToolButton#subscribeToolButton:disabled { + background: gray; + border-radius: 4px; + border: 1px solid gray; + color: lightgray; +} + +/* only for MenuButtonPopup */ +GxsChannelPostsWidget QToolButton#subscribeToolButton[popupMode="1"] { + padding-right: 0px; +} + +GxsChannelPostsWidget QToolButton#subscribeToolButton::menu-arrow { + image: none; +} + +GxsChannelPostsWidget QToolButton#subscribeToolButton::menu-button { + image: none; +} + +PostedItem QFrame#voteFrame { + background: #f8f9fa; +} + +PostedItem QFrame#mainFrame{ + background: white; +} + +PostedItem QFrame#frame_picture{ + background: white; +} + +PostedItem QLabel#thumbnailLabel{ + border: 2px solid #CCCCCC; + border-radius: 3px; +} + +PostedItem QLabel#fromBoldLabel, QLabel#fromLabel, QLabel#dateLabel, QLabel#siteBoldLabel { + color: #787c7e; +} + +PostedItem QToolButton#commentButton{ + font-size: 12px; + color: #878a8c; + font-weight: bold; + +}