disabled red background in #mentions

This commit is contained in:
fourtf
2018-10-21 13:29:52 +02:00
parent f4cf464ddb
commit c6e1ec3c71
5 changed files with 15 additions and 5 deletions
+4 -5
View File
@@ -209,21 +209,20 @@ void MessageLayout::updateBuffer(QPixmap *buffer, int /*messageIndex*/,
auto app = getApp();
QPainter painter(buffer);
painter.setRenderHint(QPainter::SmoothPixmapTransform);
// draw background
QColor backgroundColor;
if (this->message_->flags.has(MessageFlag::Highlighted)) {
QColor backgroundColor = app->themes->messages.backgrounds.regular;
if (this->message_->flags.has(MessageFlag::Highlighted) &&
!this->flags.has(MessageLayoutFlag::IgnoreHighlights)) {
backgroundColor = app->themes->messages.backgrounds.highlighted;
} else if (this->message_->flags.has(MessageFlag::Subscription)) {
backgroundColor = app->themes->messages.backgrounds.subscription;
} else if (getSettings()->alternateMessageBackground.getValue() &&
this->flags.has(MessageLayoutFlag::AlternateBackground)) {
backgroundColor = app->themes->messages.backgrounds.alternate;
} else {
backgroundColor = app->themes->messages.backgrounds.regular;
}
painter.fillRect(buffer->rect(), backgroundColor);
// draw message