From 81ce8dcc08e5b87f44311c23ad2050cec04c42fc Mon Sep 17 00:00:00 2001 From: fourtf Date: Sat, 13 Mar 2021 12:33:54 +0100 Subject: [PATCH] moved last message line in settings and changed defaults --- src/singletons/Settings.hpp | 4 +- src/widgets/helper/Line.hpp | 2 +- src/widgets/settingspages/GeneralPage.cpp | 57 ++++++++++++----------- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 893699952..a8f6fc7d1 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -70,9 +70,9 @@ public: BoolSetting showLastMessageIndicator = { "/appearance/messages/showLastMessageIndicator", false}; EnumSetting lastMessagePattern = { - "/appearance/messages/lastMessagePattern", Qt::VerPattern}; + "/appearance/messages/lastMessagePattern", Qt::SolidPattern}; QStringSetting lastMessageColor = {"/appearance/messages/lastMessageColor", - ""}; + "#7f2026"}; BoolSetting showEmptyInput = {"/appearance/showEmptyInputBox", true}; BoolSetting showMessageLength = {"/appearance/messages/showMessageLength", false}; diff --git a/src/widgets/helper/Line.hpp b/src/widgets/helper/Line.hpp index e36669fa3..7da66562f 100644 --- a/src/widgets/helper/Line.hpp +++ b/src/widgets/helper/Line.hpp @@ -27,7 +27,7 @@ public: { QPainter painter(this); - painter.setPen(QColor("#999")); + painter.setPen(QColor(153, 153, 153, 153)); if (this->vertical_) { diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index 890df0f4d..81dd09c40 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -227,33 +227,6 @@ void GeneralPage::initLayout(GeneralPageView &layout) layout.addCheckbox("Separate with lines", s.separateMessages); layout.addCheckbox("Alternate background color", s.alternateMessages); layout.addCheckbox("Show deleted messages", s.hideModerated, true); - layout.addCheckbox("Show last message line", s.showLastMessageIndicator); - layout.addDropdown::type>( - "Last message line style", {"Dotted", "Solid"}, s.lastMessagePattern, - [](int value) { - switch (value) - { - case Qt::VerPattern: - return 0; - case Qt::SolidPattern: - default: - return 1; - } - }, - [](DropdownArgs args) { - switch (args.index) - { - case 0: - return Qt::VerPattern; - case 1: - default: - return Qt::SolidPattern; - } - }, - false); - layout.addColorButton("Last message line color", - QColor(getSettings()->lastMessageColor.getValue()), - getSettings()->lastMessageColor); layout.addCheckbox("Highlight messages redeemed with Channel Points", s.enableRedeemedHighlight); layout.addDropdown( @@ -283,6 +256,36 @@ void GeneralPage::initLayout(GeneralPageView &layout) [](auto args) { return fuzzyToInt(args.value, 0); }); + layout.addSeperator(); + layout.addCheckbox("Draw a line below the most recent message before " + "switching applications.", + s.showLastMessageIndicator); + layout.addDropdown::type>( + "Line style", {"Dotted", "Solid"}, s.lastMessagePattern, + [](int value) { + switch (value) + { + case Qt::VerPattern: + return 0; + case Qt::SolidPattern: + default: + return 1; + } + }, + [](DropdownArgs args) { + switch (args.index) + { + case 0: + return Qt::VerPattern; + case 1: + default: + return Qt::SolidPattern; + } + }, + false); + layout.addColorButton("Line color", + QColor(getSettings()->lastMessageColor.getValue()), + getSettings()->lastMessageColor); layout.addTitle("Emotes"); layout.addCheckbox("Enable", s.enableEmoteImages);