mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add "Timeout action" setting
This commit is contained in:
parent
41fbcc738b
commit
9886021c6a
|
@ -164,7 +164,7 @@ void MessageLayout::paint(QPainter &painter, int y, int messageIndex, Selection
|
|||
QColor color = isWindowFocused ? themeManager.tabs.selected.backgrounds.regular.color()
|
||||
: themeManager.tabs.selected.backgrounds.unfocused.color();
|
||||
|
||||
QBrush brush = QBrush(color, Qt::VerPattern);
|
||||
QBrush brush(color, Qt::VerPattern);
|
||||
|
||||
painter.fillRect(0, y + this->container.getHeight() - 1, this->container.getWidth(), 1,
|
||||
brush);
|
||||
|
|
|
@ -82,6 +82,7 @@ public:
|
|||
|
||||
/// Moderation
|
||||
QStringSetting moderationActions = {"/moderation/actions", "/ban {user}\n/timeout {user} 300"};
|
||||
QStringSetting timeoutAction = {"/moderation/timeoutAction", "Disable"};
|
||||
|
||||
/// Highlighting
|
||||
BoolSetting enableHighlights = {"/highlighting/enabled", true};
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
ModerationPage::ModerationPage()
|
||||
: SettingsPage("Moderation", "")
|
||||
{
|
||||
|
@ -27,6 +28,12 @@ ModerationPage::ModerationPage()
|
|||
label->setStyleSheet("color: #bbb");
|
||||
// clang-format on
|
||||
|
||||
auto form = layout.emplace<QFormLayout>();
|
||||
{
|
||||
form->addRow("Action on timed out messages (unimplemented):",
|
||||
this->createComboBox({"Disable", "Hide"}, settings.timeoutAction));
|
||||
}
|
||||
|
||||
auto modButtons =
|
||||
layout.emplace<QGroupBox>("Custom moderator buttons").setLayoutType<QVBoxLayout>();
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@ public:
|
|||
private:
|
||||
QTimer itemsChangedTimer;
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
Loading…
Reference in a new issue