refined highlight and added bits highlights
This commit is contained in:
@@ -35,6 +35,12 @@ SBHighlight Message::getScrollBarHighlight() const
|
||||
return SBHighlight(
|
||||
ColorProvider::instance().color(ColorType::Subscription));
|
||||
}
|
||||
else if (this->flags.has(MessageFlag::RedeemedHighlight))
|
||||
{
|
||||
return SBHighlight(
|
||||
ColorProvider::instance().color(ColorType::RedeemedHighlight),
|
||||
SBHighlight::Default, true);
|
||||
}
|
||||
return SBHighlight();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ enum class MessageFlag : uint32_t {
|
||||
HighlightedWhisper = (1 << 17),
|
||||
Debug = (1 << 18),
|
||||
Similar = (1 << 19),
|
||||
RedeemedHighlight = (1 << 20),
|
||||
};
|
||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||
|
||||
|
||||
@@ -263,6 +263,7 @@ void MessageLayout::updateBuffer(QPixmap *buffer, int /*messageIndex*/,
|
||||
Selection & /*selection*/)
|
||||
{
|
||||
auto app = getApp();
|
||||
auto settings = getSettings();
|
||||
|
||||
QPainter painter(buffer);
|
||||
painter.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
@@ -296,6 +297,14 @@ void MessageLayout::updateBuffer(QPixmap *buffer, int /*messageIndex*/,
|
||||
backgroundColor,
|
||||
*ColorProvider::instance().color(ColorType::Subscription));
|
||||
}
|
||||
else if (this->message_->flags.has(MessageFlag::RedeemedHighlight) &&
|
||||
settings->enableRedeemedHighlight.getValue())
|
||||
{
|
||||
// Blend highlight color with usual background color
|
||||
backgroundColor = blendColors(
|
||||
backgroundColor,
|
||||
*ColorProvider::instance().color(ColorType::RedeemedHighlight));
|
||||
}
|
||||
else if (this->message_->flags.has(MessageFlag::AutoMod))
|
||||
{
|
||||
backgroundColor = QColor("#404040");
|
||||
|
||||
Reference in New Issue
Block a user