diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp index f72649dfc..af62f5a91 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp @@ -445,10 +445,13 @@ QVariant RsGxsForumModel::textColorRole(const ForumModelPostEntry& fmpe,int /*co if( (fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_MISSING)) return QVariant(mTextColorMissing); - if(IS_MSG_UNREAD(fmpe.mMsgStatus) || (fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)) + if(IS_MSG_UNREAD(fmpe.mMsgStatus)) return QVariant(mTextColorUnread); else - return QVariant(mTextColorRead); + if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED) + return QVariant(mTextColorPinned); + else + return QVariant(mTextColorRead); return QVariant(); } diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumModel.h b/retroshare-gui/src/gui/gxsforums/GxsForumModel.h index cdbed3b0b..0dc9c6898 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumModel.h +++ b/retroshare-gui/src/gui/gxsforums/GxsForumModel.h @@ -116,6 +116,7 @@ public: void setTextColorUnreadChildren(QColor color) { mTextColorUnreadChildren = color;} void setTextColorNotSubscribed (QColor color) { mTextColorNotSubscribed = color;} void setTextColorMissing (QColor color) { mTextColorMissing = color;} + void setTextColorPinned (QColor color) { mTextColorPinned = color;} void setMsgReadStatus(const QModelIndex &i, bool read_status, bool with_children); void setFilter(int column, const QStringList &strings, uint32_t &count) ; @@ -202,6 +203,7 @@ private: QColor mTextColorUnreadChildren; QColor mTextColorNotSubscribed ; QColor mTextColorMissing ; + QColor mTextColorPinned ; friend class const_iterator; }; diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index d34dcb77c..c632b380f 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -216,6 +216,8 @@ void GxsForumThreadWidget::setTextColorUnread (QColor color) { mTextColor void GxsForumThreadWidget::setTextColorUnreadChildren(QColor color) { mTextColorUnreadChildren = color; mThreadModel->setTextColorUnreadChildren(color);} void GxsForumThreadWidget::setTextColorNotSubscribed (QColor color) { mTextColorNotSubscribed = color; mThreadModel->setTextColorNotSubscribed (color);} void GxsForumThreadWidget::setTextColorMissing (QColor color) { mTextColorMissing = color; mThreadModel->setTextColorMissing (color);} +// Suppose to be different from unread one +void GxsForumThreadWidget::setTextColorPinned (QColor color) { mTextColorPinned = color; mThreadModel->setTextColorPinned (color);} GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget *parent) : GxsMessageFrameWidget(rsGxsForums, parent), diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h index 579cc15fd..919c755a9 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h @@ -52,6 +52,7 @@ class GxsForumThreadWidget : public GxsMessageFrameWidget Q_PROPERTY(QColor textColorUnreadChildren READ textColorUnreadChildren WRITE setTextColorUnreadChildren) Q_PROPERTY(QColor textColorNotSubscribed READ textColorNotSubscribed WRITE setTextColorNotSubscribed) Q_PROPERTY(QColor textColorMissing READ textColorMissing WRITE setTextColorMissing) + Q_PROPERTY(QColor textColorPinned READ textColorPinned WRITE setTextColorPinned) public: explicit GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget *parent = NULL); @@ -62,12 +63,14 @@ public: QColor textColorUnreadChildren() const { return mTextColorUnreadChildren; } QColor textColorNotSubscribed() const { return mTextColorNotSubscribed; } QColor textColorMissing() const { return mTextColorMissing; } + QColor textColorPinned() const { return mTextColorPinned; } void setTextColorRead (QColor color) ; void setTextColorUnread (QColor color) ; void setTextColorUnreadChildren(QColor color) ; void setTextColorNotSubscribed (QColor color) ; void setTextColorMissing (QColor color) ; + void setTextColorPinned (QColor color) ; /* GxsMessageFrameWidget */ virtual void groupIdChanged(); @@ -205,6 +208,7 @@ private: QColor mTextColorUnreadChildren; QColor mTextColorNotSubscribed; QColor mTextColorMissing; + QColor mTextColorPinned; RsGxsMessageId mNavigatePendingMsgId; QList mIgnoredMsgId; diff --git a/retroshare-gui/src/gui/qss/stylesheet/qss.default b/retroshare-gui/src/gui/qss/stylesheet/qss.default index b4e20120a..3a9072058 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/qss.default +++ b/retroshare-gui/src/gui/qss/stylesheet/qss.default @@ -138,6 +138,7 @@ ForumsDialog, GxsForumThreadWidget qproperty-textColorUnreadChildren: darkgray; qproperty-textColorNotSubscribed: black; qproperty-textColorMissing: darkRed; + qproperty-textColorPinned: darkOrange; } GroupTreeWidget diff --git a/retroshare-gui/src/qss/qdarkstyle.qss b/retroshare-gui/src/qss/qdarkstyle.qss index b50eb9aa1..fda8d04a0 100644 --- a/retroshare-gui/src/qss/qdarkstyle.qss +++ b/retroshare-gui/src/qss/qdarkstyle.qss @@ -93,6 +93,7 @@ ForumsDialog, GxsForumThreadWidget qproperty-textColorUnreadChildren: red; qproperty-textColorNotSubscribed: white; qproperty-textColorMissing: darkred; + qproperty-textColorPinned: darkOrange; } QMenuBar