diff --git a/src/messages/layouts/messagelayout.cpp b/src/messages/layouts/messagelayout.cpp index f24ce1739..baed03814 100644 --- a/src/messages/layouts/messagelayout.cpp +++ b/src/messages/layouts/messagelayout.cpp @@ -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); diff --git a/src/singletons/settingsmanager.hpp b/src/singletons/settingsmanager.hpp index 056cf1f08..b3dce5221 100644 --- a/src/singletons/settingsmanager.hpp +++ b/src/singletons/settingsmanager.hpp @@ -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}; diff --git a/src/widgets/settingspages/moderationpage.cpp b/src/widgets/settingspages/moderationpage.cpp index 625661643..5106d95ab 100644 --- a/src/widgets/settingspages/moderationpage.cpp +++ b/src/widgets/settingspages/moderationpage.cpp @@ -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(); + { + form->addRow("Action on timed out messages (unimplemented):", + this->createComboBox({"Disable", "Hide"}, settings.timeoutAction)); + } + auto modButtons = layout.emplace("Custom moderator buttons").setLayoutType(); { diff --git a/src/widgets/settingspages/moderationpage.hpp b/src/widgets/settingspages/moderationpage.hpp index c6ebdbdc3..4e30c717c 100644 --- a/src/widgets/settingspages/moderationpage.hpp +++ b/src/widgets/settingspages/moderationpage.hpp @@ -18,6 +18,7 @@ public: private: QTimer itemsChangedTimer; }; + } // namespace settingspages } // namespace widgets } // namespace chatterino