feat: allow disabling fading recent messages (#6121)
This commit is contained in:
@@ -249,7 +249,8 @@ MessagePaintResult MessageLayout::paint(const MessagePaintContext &ctx)
|
||||
ctx.messageColors.disabled);
|
||||
}
|
||||
|
||||
if (this->message_->flags.has(MessageFlag::RecentMessage))
|
||||
if (this->message_->flags.has(MessageFlag::RecentMessage) &&
|
||||
ctx.preferences.fadeMessageHistory)
|
||||
{
|
||||
ctx.painter.fillRect(0, ctx.y, pixmap->width(), pixmap->height(),
|
||||
ctx.messageColors.disabled);
|
||||
|
||||
@@ -106,6 +106,12 @@ void MessagePreferences::connectSettings(Settings *settings,
|
||||
this->lastMessagePattern = static_cast<Qt::BrushStyle>(newValue);
|
||||
},
|
||||
holder);
|
||||
|
||||
settings->fadeMessageHistory.connect(
|
||||
[this](const auto &newValue) {
|
||||
this->fadeMessageHistory = newValue;
|
||||
},
|
||||
holder);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -55,6 +55,8 @@ struct MessagePreferences {
|
||||
bool alternateMessages{};
|
||||
bool separateMessages{};
|
||||
|
||||
bool fadeMessageHistory{};
|
||||
|
||||
void connectSettings(Settings *settings,
|
||||
pajlada::Signals::SignalHolder &holder);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user