mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
last message pattern
This commit is contained in:
parent
9f6d09db7c
commit
37d3f5a24a
3 changed files with 27 additions and 1 deletions
|
@ -175,7 +175,8 @@ void MessageLayout::paint(QPainter &painter, int width, int y, int messageIndex,
|
||||||
QColor color = isWindowFocused ? app->themes->tabs.selected.backgrounds.regular.color()
|
QColor color = isWindowFocused ? app->themes->tabs.selected.backgrounds.regular.color()
|
||||||
: app->themes->tabs.selected.backgrounds.unfocused.color();
|
: app->themes->tabs.selected.backgrounds.unfocused.color();
|
||||||
|
|
||||||
QBrush brush(color, Qt::VerPattern);
|
QBrush brush(color,
|
||||||
|
static_cast<Qt::BrushStyle>(app->settings->lastMessagePattern.getValue()));
|
||||||
|
|
||||||
painter.fillRect(0, y + this->container_.getHeight() - 1, pixmap->width(), 1, brush);
|
painter.fillRect(0, y + this->container_.getHeight() - 1, pixmap->width(), 1, brush);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ public:
|
||||||
QStringSetting timestampFormat = {"/appearance/messages/timestampFormat", "h:mm"};
|
QStringSetting timestampFormat = {"/appearance/messages/timestampFormat", "h:mm"};
|
||||||
BoolSetting showBadges = {"/appearance/messages/showBadges", true};
|
BoolSetting showBadges = {"/appearance/messages/showBadges", true};
|
||||||
BoolSetting showLastMessageIndicator = {"/appearance/messages/showLastMessageIndicator", false};
|
BoolSetting showLastMessageIndicator = {"/appearance/messages/showLastMessageIndicator", false};
|
||||||
|
IntSetting lastMessagePattern = {"/appearance/messages/lastMessagePattern", Qt::VerPattern};
|
||||||
BoolSetting hideEmptyInput = {"/appearance/hideEmptyInputBox", false};
|
BoolSetting hideEmptyInput = {"/appearance/hideEmptyInputBox", false};
|
||||||
BoolSetting showMessageLength = {"/appearance/messages/showMessageLength", false};
|
BoolSetting showMessageLength = {"/appearance/messages/showMessageLength", false};
|
||||||
BoolSetting separateMessages = {"/appearance/messages/separateMessages", false};
|
BoolSetting separateMessages = {"/appearance/messages/separateMessages", false};
|
||||||
|
|
|
@ -103,6 +103,30 @@ AppearancePage::AppearancePage()
|
||||||
app->settings->showMessageLength));
|
app->settings->showMessageLength));
|
||||||
|
|
||||||
messages.append(this->createCheckBox(LAST_MSG, app->settings->showLastMessageIndicator));
|
messages.append(this->createCheckBox(LAST_MSG, app->settings->showLastMessageIndicator));
|
||||||
|
{
|
||||||
|
auto *combo = new QComboBox(this);
|
||||||
|
combo->addItems({"Ver", "Solid"});
|
||||||
|
|
||||||
|
QObject::connect(combo,
|
||||||
|
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||||
|
[](int index) {
|
||||||
|
Qt::BrushStyle brush;
|
||||||
|
switch (index) {
|
||||||
|
case 1:
|
||||||
|
brush = Qt::SolidPattern;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
case 0:
|
||||||
|
brush = Qt::VerPattern;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
getApp()->settings->lastMessagePattern = brush;
|
||||||
|
});
|
||||||
|
|
||||||
|
auto hbox = messages.emplace<QHBoxLayout>().withoutMargin();
|
||||||
|
hbox.emplace<QLabel>("Last message indicator pattern");
|
||||||
|
hbox.append(combo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto emotes = layout.emplace<QGroupBox>("Emotes").setLayoutType<QVBoxLayout>();
|
auto emotes = layout.emplace<QGroupBox>("Emotes").setLayoutType<QVBoxLayout>();
|
||||||
|
|
Loading…
Reference in a new issue