make highlighted messages and redeemed thingies look the same

This commit is contained in:
fourtf 2020-08-22 16:02:38 +02:00
parent 17b26ef59c
commit 2cc23eaae6
2 changed files with 8 additions and 3 deletions

View file

@ -35,7 +35,8 @@ SBHighlight Message::getScrollBarHighlight() const
return SBHighlight( return SBHighlight(
ColorProvider::instance().color(ColorType::Subscription)); ColorProvider::instance().color(ColorType::Subscription));
} }
else if (this->flags.has(MessageFlag::RedeemedHighlight)) else if (this->flags.has(MessageFlag::RedeemedHighlight) ||
this->flags.has(MessageFlag::RedeemedChannelPointReward))
{ {
return SBHighlight( return SBHighlight(
ColorProvider::instance().color(ColorType::RedeemedHighlight), ColorProvider::instance().color(ColorType::RedeemedHighlight),

View file

@ -221,7 +221,9 @@ void MessageLayout::paint(QPainter &painter, int width, int y, int messageIndex,
} }
if (!isMentions && if (!isMentions &&
this->message_->flags.has(MessageFlag::RedeemedChannelPointReward)) (this->message_->flags.has(MessageFlag::RedeemedChannelPointReward) ||
this->message_->flags.has(MessageFlag::RedeemedHighlight)) &&
getSettings()->enableRedeemedHighlight.getValue())
{ {
painter.fillRect( painter.fillRect(
0, y, this->scale_ * 4, pixmap->height(), 0, y, this->scale_ * 4, pixmap->height(),
@ -305,7 +307,9 @@ void MessageLayout::updateBuffer(QPixmap *buffer, int /*messageIndex*/,
backgroundColor, backgroundColor,
*ColorProvider::instance().color(ColorType::Subscription)); *ColorProvider::instance().color(ColorType::Subscription));
} }
else if (this->message_->flags.has(MessageFlag::RedeemedHighlight) && else if ((this->message_->flags.has(MessageFlag::RedeemedHighlight) ||
this->message_->flags.has(
MessageFlag::RedeemedChannelPointReward)) &&
settings->enableRedeemedHighlight.getValue()) settings->enableRedeemedHighlight.getValue())
{ {
// Blend highlight color with usual background color // Blend highlight color with usual background color