improve "last message read" indicator (#802)

This commit is contained in:
pphop
2018-10-20 16:25:24 +05:00
committed by pajlada
parent 54c1efe531
commit a584259785
5 changed files with 77 additions and 5 deletions
+9 -4
View File
@@ -183,10 +183,15 @@ void MessageLayout::paint(QPainter &painter, int width, int y, int messageIndex,
// draw last read message line
if (isLastReadMessage) {
QColor color =
isWindowFocused
? app->themes->tabs.selected.backgrounds.regular.color()
: app->themes->tabs.selected.backgrounds.unfocused.color();
QColor color;
if (getSettings()->lastMessageColor != "") {
color = QColor(getSettings()->lastMessageColor.getValue());
} else {
color =
isWindowFocused
? app->themes->tabs.selected.backgrounds.regular.color()
: app->themes->tabs.selected.backgrounds.unfocused.color();
}
QBrush brush(color, static_cast<Qt::BrushStyle>(
getSettings()->lastMessagePattern.getValue()));