feat: allow disabling fading recent messages (#6121)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## Unversioned
|
||||
|
||||
- Minor: Add an option for the reduced opacity of message history. (#6121)
|
||||
- Minor: Make paused chat indicator more visible, and fix its zoom behavior. (#6123)
|
||||
- Bugfix: Don't create native messaging manifest file if browser directory doesn't exist. (#6116)
|
||||
- Bugfix: Make reply-cancel button less coarse-grained. (#6106)
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -145,6 +145,8 @@ public:
|
||||
"/appearance/messages/messageOverflow", MessageOverflow::Highlight};
|
||||
BoolSetting separateMessages = {"/appearance/messages/separateMessages",
|
||||
false};
|
||||
BoolSetting fadeMessageHistory = {"/appearance/messages/fadeMessageHistory",
|
||||
true};
|
||||
BoolSetting hideModerated = {"/appearance/messages/hideModerated", false};
|
||||
BoolSetting hideModerationActions = {
|
||||
"/appearance/messages/hideModerationActions", false};
|
||||
|
||||
@@ -168,6 +168,7 @@ WindowManager::WindowManager(const Paths &paths, Settings &settings,
|
||||
|
||||
this->invalidateChannelViewBuffersListener.add(settings.alternateMessages);
|
||||
this->invalidateChannelViewBuffersListener.add(settings.separateMessages);
|
||||
this->invalidateChannelViewBuffersListener.add(settings.fadeMessageHistory);
|
||||
|
||||
this->repaintVisibleChatWidgetsListener.add(
|
||||
this->themes.repaintVisibleChatWidgets_);
|
||||
|
||||
@@ -505,6 +505,13 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
||||
"message to help better tell them apart.")
|
||||
->addTo(layout);
|
||||
|
||||
SettingWidget::checkbox("Reduce opacity of message history",
|
||||
s.fadeMessageHistory)
|
||||
->setTooltip(
|
||||
"Reduce opacity of messages that were posted before Chatterino "
|
||||
"was started or while re-connection.")
|
||||
->addTo(layout);
|
||||
|
||||
SettingWidget::checkbox("Hide deleted messages", s.hideModerated)
|
||||
->setTooltip(
|
||||
"When enabled, messages deleted by moderators will be hidden.")
|
||||
|
||||
Reference in New Issue
Block a user