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
dc578a5f29
|
@ -164,7 +164,7 @@ void MessageLayout::paint(QPainter &painter, int y, int messageIndex, Selection
|
||||||
QColor color = isWindowFocused ? themeManager.tabs.selected.backgrounds.regular.color()
|
QColor color = isWindowFocused ? themeManager.tabs.selected.backgrounds.regular.color()
|
||||||
: themeManager.tabs.selected.backgrounds.unfocused.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,
|
painter.fillRect(0, y + this->container.getHeight() - 1, this->container.getWidth(), 1,
|
||||||
brush);
|
brush);
|
||||||
|
|
|
@ -82,6 +82,7 @@ public:
|
||||||
|
|
||||||
/// Moderation
|
/// Moderation
|
||||||
QStringSetting moderationActions = {"/moderation/actions", "/ban {user}\n/timeout {user} 300"};
|
QStringSetting moderationActions = {"/moderation/actions", "/ban {user}\n/timeout {user} 300"};
|
||||||
|
QStringSetting timeoutAction = {"/moderation/timeoutAction", "Disable"};
|
||||||
|
|
||||||
/// Highlighting
|
/// Highlighting
|
||||||
BoolSetting enableHighlights = {"/highlighting/enabled", true};
|
BoolSetting enableHighlights = {"/highlighting/enabled", true};
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
namespace widgets {
|
namespace widgets {
|
||||||
namespace settingspages {
|
namespace settingspages {
|
||||||
|
|
||||||
ModerationPage::ModerationPage()
|
ModerationPage::ModerationPage()
|
||||||
: SettingsPage("Moderation", "")
|
: SettingsPage("Moderation", "")
|
||||||
{
|
{
|
||||||
|
@ -27,6 +28,12 @@ ModerationPage::ModerationPage()
|
||||||
label->setStyleSheet("color: #bbb");
|
label->setStyleSheet("color: #bbb");
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
auto form = layout.emplace<QFormLayout>();
|
||||||
|
{
|
||||||
|
form->addRow("Action on timed out messages (unimplemented):",
|
||||||
|
this->createComboBox({"Disable", "Hide"}, settings.timeoutAction));
|
||||||
|
}
|
||||||
|
|
||||||
auto modButtons =
|
auto modButtons =
|
||||||
layout.emplace<QGroupBox>("Custom moderator buttons").setLayoutType<QVBoxLayout>();
|
layout.emplace<QGroupBox>("Custom moderator buttons").setLayoutType<QVBoxLayout>();
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,6 +18,7 @@ public:
|
||||||
private:
|
private:
|
||||||
QTimer itemsChangedTimer;
|
QTimer itemsChangedTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace settingspages
|
} // namespace settingspages
|
||||||
} // namespace widgets
|
} // namespace widgets
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
Loading…
Reference in a new issue