feat: allow disabling fading recent messages (#6121)
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Unversioned
|
## 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)
|
- 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: Don't create native messaging manifest file if browser directory doesn't exist. (#6116)
|
||||||
- Bugfix: Make reply-cancel button less coarse-grained. (#6106)
|
- Bugfix: Make reply-cancel button less coarse-grained. (#6106)
|
||||||
|
|||||||
@@ -249,7 +249,8 @@ MessagePaintResult MessageLayout::paint(const MessagePaintContext &ctx)
|
|||||||
ctx.messageColors.disabled);
|
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.painter.fillRect(0, ctx.y, pixmap->width(), pixmap->height(),
|
||||||
ctx.messageColors.disabled);
|
ctx.messageColors.disabled);
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ void MessagePreferences::connectSettings(Settings *settings,
|
|||||||
this->lastMessagePattern = static_cast<Qt::BrushStyle>(newValue);
|
this->lastMessagePattern = static_cast<Qt::BrushStyle>(newValue);
|
||||||
},
|
},
|
||||||
holder);
|
holder);
|
||||||
|
|
||||||
|
settings->fadeMessageHistory.connect(
|
||||||
|
[this](const auto &newValue) {
|
||||||
|
this->fadeMessageHistory = newValue;
|
||||||
|
},
|
||||||
|
holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ struct MessagePreferences {
|
|||||||
bool alternateMessages{};
|
bool alternateMessages{};
|
||||||
bool separateMessages{};
|
bool separateMessages{};
|
||||||
|
|
||||||
|
bool fadeMessageHistory{};
|
||||||
|
|
||||||
void connectSettings(Settings *settings,
|
void connectSettings(Settings *settings,
|
||||||
pajlada::Signals::SignalHolder &holder);
|
pajlada::Signals::SignalHolder &holder);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -145,6 +145,8 @@ public:
|
|||||||
"/appearance/messages/messageOverflow", MessageOverflow::Highlight};
|
"/appearance/messages/messageOverflow", MessageOverflow::Highlight};
|
||||||
BoolSetting separateMessages = {"/appearance/messages/separateMessages",
|
BoolSetting separateMessages = {"/appearance/messages/separateMessages",
|
||||||
false};
|
false};
|
||||||
|
BoolSetting fadeMessageHistory = {"/appearance/messages/fadeMessageHistory",
|
||||||
|
true};
|
||||||
BoolSetting hideModerated = {"/appearance/messages/hideModerated", false};
|
BoolSetting hideModerated = {"/appearance/messages/hideModerated", false};
|
||||||
BoolSetting hideModerationActions = {
|
BoolSetting hideModerationActions = {
|
||||||
"/appearance/messages/hideModerationActions", false};
|
"/appearance/messages/hideModerationActions", false};
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ WindowManager::WindowManager(const Paths &paths, Settings &settings,
|
|||||||
|
|
||||||
this->invalidateChannelViewBuffersListener.add(settings.alternateMessages);
|
this->invalidateChannelViewBuffersListener.add(settings.alternateMessages);
|
||||||
this->invalidateChannelViewBuffersListener.add(settings.separateMessages);
|
this->invalidateChannelViewBuffersListener.add(settings.separateMessages);
|
||||||
|
this->invalidateChannelViewBuffersListener.add(settings.fadeMessageHistory);
|
||||||
|
|
||||||
this->repaintVisibleChatWidgetsListener.add(
|
this->repaintVisibleChatWidgetsListener.add(
|
||||||
this->themes.repaintVisibleChatWidgets_);
|
this->themes.repaintVisibleChatWidgets_);
|
||||||
|
|||||||
@@ -505,6 +505,13 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
|||||||
"message to help better tell them apart.")
|
"message to help better tell them apart.")
|
||||||
->addTo(layout);
|
->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)
|
SettingWidget::checkbox("Hide deleted messages", s.hideModerated)
|
||||||
->setTooltip(
|
->setTooltip(
|
||||||
"When enabled, messages deleted by moderators will be hidden.")
|
"When enabled, messages deleted by moderators will be hidden.")
|
||||||
|
|||||||
Reference in New Issue
Block a user