summary refs log tree commit diff
path: root/src/RoomInfoListItem.cpp
diff options
context:
space:
mode:
authorredsky17 <joedonofry@gmail.com>2019-02-07 23:15:25 +0000
committerredsky17 <joedonofry@gmail.com>2019-02-07 23:15:25 +0000
commitbb345a9a9f6ded16356f5e0607577bba089ccee4 (patch)
tree1fcdd6a4e6d9795853e43b3b235e845fe63a9c73 /src/RoomInfoListItem.cpp
parentMerge pull request #12 from rnhmjoj/fix-join (diff)
parentPrevent symlinks from overwriting files (diff)
downloadnheko-bb345a9a9f6ded16356f5e0607577bba089ccee4.tar.xz
Merge branch 'ui-enhancements'
Preparing for 0.6.3 release
Diffstat (limited to 'src/RoomInfoListItem.cpp')
-rw-r--r--src/RoomInfoListItem.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp

index fcf5bd72..f17b383c 100644 --- a/src/RoomInfoListItem.cpp +++ b/src/RoomInfoListItem.cpp
@@ -101,6 +101,7 @@ RoomInfoListItem::RoomInfoListItem(QString room_id, RoomInfo info, QWidget *pare , roomName_{QString::fromStdString(std::move(info.name))} , isPressed_(false) , unreadMsgCount_(0) + , unreadHighlightedMsgCount_(0) { init(parent); @@ -301,7 +302,11 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) if (unreadMsgCount_ > 0) { QBrush brush; brush.setStyle(Qt::SolidPattern); - brush.setColor(bubbleBgColor()); + if (unreadHighlightedMsgCount_ > 0) { + brush.setColor(mentionedColor()); + } else { + brush.setColor(bubbleBgColor()); + } if (isPressed_) brush.setColor(bubbleFgColor()); @@ -354,9 +359,10 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) } void -RoomInfoListItem::updateUnreadMessageCount(int count) +RoomInfoListItem::updateUnreadMessageCount(int count, int highlightedCount) { - unreadMsgCount_ = count; + unreadMsgCount_ = count; + unreadHighlightedMsgCount_ = highlightedCount; update(); }