mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
added icon for pinned posts and removed colored background
This commit is contained in:
parent
ca94fba8e3
commit
07775e5262
@ -445,15 +445,15 @@ QVariant RsGxsForumModel::textColorRole(const ForumModelPostEntry& fmpe,int /*co
|
||||
if( (fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_MISSING))
|
||||
return QVariant(mTextColorMissing);
|
||||
|
||||
if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)
|
||||
return QVariant(mTextColorPinned);
|
||||
|
||||
if(IS_MSG_UNREAD(fmpe.mMsgStatus))
|
||||
return QVariant(mTextColorUnread);
|
||||
else
|
||||
if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)
|
||||
return QVariant(mTextColorPinned);
|
||||
else
|
||||
return QVariant(mTextColorRead);
|
||||
return QVariant(mTextColorRead);
|
||||
|
||||
return QVariant();
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant RsGxsForumModel::statusRole(const ForumModelPostEntry& fmpe,int column) const
|
||||
@ -595,8 +595,8 @@ QVariant RsGxsForumModel::pinnedRole(const ForumModelPostEntry& fmpe,int /*colum
|
||||
|
||||
QVariant RsGxsForumModel::backgroundRole(const ForumModelPostEntry& fmpe,int /*column*/) const
|
||||
{
|
||||
if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)
|
||||
return QVariant(QBrush(mBackgroundColorPinned));
|
||||
// if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)
|
||||
// return QVariant(QBrush(mBackgroundColorPinned));
|
||||
|
||||
if(mFilteringEnabled && (fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_PASSES_FILTER))
|
||||
return QVariant(QBrush(mBackgroundColorFiltered));
|
||||
@ -656,12 +656,13 @@ QVariant RsGxsForumModel::displayRole(const ForumModelPostEntry& fmpe,int col) c
|
||||
{
|
||||
case COLUMN_THREAD_TITLE: if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_REDACTED)
|
||||
return QVariant(tr("[ ... Redacted message ... ]"));
|
||||
else if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)
|
||||
return QVariant(tr("[PINNED] ") + QString::fromUtf8(fmpe.mTitle.c_str()));
|
||||
else
|
||||
// else if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)
|
||||
// return QVariant( QString("<img src=\":/icons/pinned_64.png\" height=%1/>").arg(QFontMetricsF(QFont()).height())
|
||||
// + QString::fromUtf8(fmpe.mTitle.c_str()));
|
||||
else
|
||||
return QVariant(QString::fromUtf8(fmpe.mTitle.c_str()));
|
||||
|
||||
case COLUMN_THREAD_READ:return QVariant();
|
||||
case COLUMN_THREAD_READ:return QVariant();
|
||||
case COLUMN_THREAD_DATE:{
|
||||
if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_MISSING)
|
||||
return QVariant(QString());
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user