feat: allow disabling fading recent messages (#6121)

This commit is contained in:
fourtf
2025-04-06 14:21:34 +02:00
committed by GitHub
parent 5901b69898
commit edbdcc1d55
7 changed files with 21 additions and 1 deletions
+2 -1
View File
@@ -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);
};