mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed bug in coloring of read/unread property
This commit is contained in:
parent
7384015850
commit
0b0e58bd3d
@ -301,8 +301,13 @@ QVariant RsGxsForumModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
QVariant RsGxsForumModel::textColorRole(const ForumModelPostEntry& fmpe,int column) const
|
||||
{
|
||||
if( (fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_HAS_UNREAD_CHILDREN) && !IS_MSG_UNREAD(fmpe.mMsgStatus))
|
||||
return QVariant(mTextColorUnreadChildren);
|
||||
if( (fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_MISSING))
|
||||
return QVariant(mTextColorMissing);
|
||||
|
||||
if(IS_MSG_UNREAD(fmpe.mMsgStatus))
|
||||
return QVariant(mTextColorUnread);
|
||||
else
|
||||
return QVariant(mTextColorRead);
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public:
|
||||
|
||||
QPixmap pix = icon.pixmap(r.size());
|
||||
|
||||
return QSize(pix.width() + fm.width(str),1.2*fm.height());
|
||||
return QSize(pix.width() + fm.width(str),std::max(1.1*pix.height(),1.4*fm.height()));
|
||||
}
|
||||
|
||||
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex& index) const override
|
||||
|
Loading…
Reference in New Issue
Block a user