From 0b0e58bd3ded0543745a9f83a53f178ba1954d21 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 24 Nov 2018 22:25:23 +0100 Subject: [PATCH] fixed bug in coloring of read/unread property --- retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp | 9 +++++++-- .../src/gui/gxsforums/GxsForumThreadWidget.cpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp index da5c1c281..0b7d6becf 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp @@ -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(); } diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index ad6d6bcb1..d9aa36817 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -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