mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-09 03:18:41 -05:00
gxsforums: add separate text color for pinned posts
This commit is contained in:
parent
db978e147b
commit
4a4adc354f
@ -445,8 +445,11 @@ QVariant RsGxsForumModel::textColorRole(const ForumModelPostEntry& fmpe,int /*co
|
|||||||
if( (fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_MISSING))
|
if( (fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_MISSING))
|
||||||
return QVariant(mTextColorMissing);
|
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);
|
return QVariant(mTextColorUnread);
|
||||||
|
else
|
||||||
|
if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)
|
||||||
|
return QVariant(mTextColorPinned);
|
||||||
else
|
else
|
||||||
return QVariant(mTextColorRead);
|
return QVariant(mTextColorRead);
|
||||||
|
|
||||||
|
@ -116,6 +116,7 @@ public:
|
|||||||
void setTextColorUnreadChildren(QColor color) { mTextColorUnreadChildren = color;}
|
void setTextColorUnreadChildren(QColor color) { mTextColorUnreadChildren = color;}
|
||||||
void setTextColorNotSubscribed (QColor color) { mTextColorNotSubscribed = color;}
|
void setTextColorNotSubscribed (QColor color) { mTextColorNotSubscribed = color;}
|
||||||
void setTextColorMissing (QColor color) { mTextColorMissing = 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 setMsgReadStatus(const QModelIndex &i, bool read_status, bool with_children);
|
||||||
void setFilter(int column, const QStringList &strings, uint32_t &count) ;
|
void setFilter(int column, const QStringList &strings, uint32_t &count) ;
|
||||||
@ -202,6 +203,7 @@ private:
|
|||||||
QColor mTextColorUnreadChildren;
|
QColor mTextColorUnreadChildren;
|
||||||
QColor mTextColorNotSubscribed ;
|
QColor mTextColorNotSubscribed ;
|
||||||
QColor mTextColorMissing ;
|
QColor mTextColorMissing ;
|
||||||
|
QColor mTextColorPinned ;
|
||||||
|
|
||||||
friend class const_iterator;
|
friend class const_iterator;
|
||||||
};
|
};
|
||||||
|
@ -216,6 +216,8 @@ void GxsForumThreadWidget::setTextColorUnread (QColor color) { mTextColor
|
|||||||
void GxsForumThreadWidget::setTextColorUnreadChildren(QColor color) { mTextColorUnreadChildren = color; mThreadModel->setTextColorUnreadChildren(color);}
|
void GxsForumThreadWidget::setTextColorUnreadChildren(QColor color) { mTextColorUnreadChildren = color; mThreadModel->setTextColorUnreadChildren(color);}
|
||||||
void GxsForumThreadWidget::setTextColorNotSubscribed (QColor color) { mTextColorNotSubscribed = color; mThreadModel->setTextColorNotSubscribed (color);}
|
void GxsForumThreadWidget::setTextColorNotSubscribed (QColor color) { mTextColorNotSubscribed = color; mThreadModel->setTextColorNotSubscribed (color);}
|
||||||
void GxsForumThreadWidget::setTextColorMissing (QColor color) { mTextColorMissing = color; mThreadModel->setTextColorMissing (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) :
|
GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget *parent) :
|
||||||
GxsMessageFrameWidget(rsGxsForums, parent),
|
GxsMessageFrameWidget(rsGxsForums, parent),
|
||||||
|
@ -52,6 +52,7 @@ class GxsForumThreadWidget : public GxsMessageFrameWidget
|
|||||||
Q_PROPERTY(QColor textColorUnreadChildren READ textColorUnreadChildren WRITE setTextColorUnreadChildren)
|
Q_PROPERTY(QColor textColorUnreadChildren READ textColorUnreadChildren WRITE setTextColorUnreadChildren)
|
||||||
Q_PROPERTY(QColor textColorNotSubscribed READ textColorNotSubscribed WRITE setTextColorNotSubscribed)
|
Q_PROPERTY(QColor textColorNotSubscribed READ textColorNotSubscribed WRITE setTextColorNotSubscribed)
|
||||||
Q_PROPERTY(QColor textColorMissing READ textColorMissing WRITE setTextColorMissing)
|
Q_PROPERTY(QColor textColorMissing READ textColorMissing WRITE setTextColorMissing)
|
||||||
|
Q_PROPERTY(QColor textColorPinned READ textColorPinned WRITE setTextColorPinned)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget *parent = NULL);
|
explicit GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget *parent = NULL);
|
||||||
@ -62,12 +63,14 @@ public:
|
|||||||
QColor textColorUnreadChildren() const { return mTextColorUnreadChildren; }
|
QColor textColorUnreadChildren() const { return mTextColorUnreadChildren; }
|
||||||
QColor textColorNotSubscribed() const { return mTextColorNotSubscribed; }
|
QColor textColorNotSubscribed() const { return mTextColorNotSubscribed; }
|
||||||
QColor textColorMissing() const { return mTextColorMissing; }
|
QColor textColorMissing() const { return mTextColorMissing; }
|
||||||
|
QColor textColorPinned() const { return mTextColorPinned; }
|
||||||
|
|
||||||
void setTextColorRead (QColor color) ;
|
void setTextColorRead (QColor color) ;
|
||||||
void setTextColorUnread (QColor color) ;
|
void setTextColorUnread (QColor color) ;
|
||||||
void setTextColorUnreadChildren(QColor color) ;
|
void setTextColorUnreadChildren(QColor color) ;
|
||||||
void setTextColorNotSubscribed (QColor color) ;
|
void setTextColorNotSubscribed (QColor color) ;
|
||||||
void setTextColorMissing (QColor color) ;
|
void setTextColorMissing (QColor color) ;
|
||||||
|
void setTextColorPinned (QColor color) ;
|
||||||
|
|
||||||
/* GxsMessageFrameWidget */
|
/* GxsMessageFrameWidget */
|
||||||
virtual void groupIdChanged();
|
virtual void groupIdChanged();
|
||||||
@ -205,6 +208,7 @@ private:
|
|||||||
QColor mTextColorUnreadChildren;
|
QColor mTextColorUnreadChildren;
|
||||||
QColor mTextColorNotSubscribed;
|
QColor mTextColorNotSubscribed;
|
||||||
QColor mTextColorMissing;
|
QColor mTextColorMissing;
|
||||||
|
QColor mTextColorPinned;
|
||||||
|
|
||||||
RsGxsMessageId mNavigatePendingMsgId;
|
RsGxsMessageId mNavigatePendingMsgId;
|
||||||
QList<RsGxsMessageId> mIgnoredMsgId;
|
QList<RsGxsMessageId> mIgnoredMsgId;
|
||||||
|
@ -138,6 +138,7 @@ ForumsDialog, GxsForumThreadWidget
|
|||||||
qproperty-textColorUnreadChildren: darkgray;
|
qproperty-textColorUnreadChildren: darkgray;
|
||||||
qproperty-textColorNotSubscribed: black;
|
qproperty-textColorNotSubscribed: black;
|
||||||
qproperty-textColorMissing: darkRed;
|
qproperty-textColorMissing: darkRed;
|
||||||
|
qproperty-textColorPinned: darkOrange;
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupTreeWidget
|
GroupTreeWidget
|
||||||
|
@ -93,6 +93,7 @@ ForumsDialog, GxsForumThreadWidget
|
|||||||
qproperty-textColorUnreadChildren: red;
|
qproperty-textColorUnreadChildren: red;
|
||||||
qproperty-textColorNotSubscribed: white;
|
qproperty-textColorNotSubscribed: white;
|
||||||
qproperty-textColorMissing: darkred;
|
qproperty-textColorMissing: darkred;
|
||||||
|
qproperty-textColorPinned: darkOrange;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenuBar
|
QMenuBar
|
||||||
|
Loading…
x
Reference in New Issue
Block a user