diff --git a/CHANGELOG.md b/CHANGELOG.md index 930d4362..0cc0f936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - Minor: Added the ability to change the top-most status of a window regardless of the _Always on top_ setting (right click the notebook). (#5135) - Minor: Live streams that are marked as reruns now mark a tab as yellow instead of red. (#5176) - Minor: Updated to Emoji v15.1. Google emojis are now used as the fallback instead of Twitter emojis. (#5182) +- Minor: Allow theming of tab live and rerun indicators. (#5188) - Bugfix: Fixed an issue where certain emojis did not send to Twitch chat correctly. (#4840) - Bugfix: Fixed capitalized channel names in log inclusion list not being logged. (#4848) - Bugfix: Trimmed custom streamlink paths on all platforms making sure you don't accidentally add spaces at the beginning or end of its path. (#4834) diff --git a/docs/ChatterinoTheme.schema.json b/docs/ChatterinoTheme.schema.json index a0c7972d..30f4a794 100644 --- a/docs/ChatterinoTheme.schema.json +++ b/docs/ChatterinoTheme.schema.json @@ -339,6 +339,8 @@ "type": "object", "additionalProperties": false, "properties": { + "liveIndicator": { "$ref": "#/definitions/qt-color" }, + "rerunIndicator": { "$ref": "#/definitions/qt-color" }, "dividerLine": { "$ref": "#/definitions/qt-color" }, "highlighted": { "$ref": "#/definitions/tab-colors" diff --git a/resources/themes/Black.json b/resources/themes/Black.json index 79f46dc7..20014cbe 100644 --- a/resources/themes/Black.json +++ b/resources/themes/Black.json @@ -50,6 +50,8 @@ "resizeHandleBackground": "#200094ff" }, "tabs": { + "liveIndicator": "#ff0000", + "rerunIndicator": "#c7c715", "dividerLine": "#555555", "highlighted": { "backgrounds": { diff --git a/resources/themes/Dark.json b/resources/themes/Dark.json index 036ce18a..cc0ff7f0 100644 --- a/resources/themes/Dark.json +++ b/resources/themes/Dark.json @@ -50,6 +50,8 @@ "resizeHandleBackground": "#200094ff" }, "tabs": { + "liveIndicator": "#ff0000", + "rerunIndicator": "#c7c715", "dividerLine": "#555555", "highlighted": { "backgrounds": { diff --git a/resources/themes/Light.json b/resources/themes/Light.json index 338c642e..2097ff81 100644 --- a/resources/themes/Light.json +++ b/resources/themes/Light.json @@ -50,6 +50,8 @@ "resizeHandleBackground": "#500094ff" }, "tabs": { + "liveIndicator": "#ff0000", + "rerunIndicator": "#c7c715", "dividerLine": "#b4d7ff", "highlighted": { "backgrounds": { diff --git a/resources/themes/White.json b/resources/themes/White.json index 7676ac62..950cfc6e 100644 --- a/resources/themes/White.json +++ b/resources/themes/White.json @@ -50,6 +50,8 @@ "resizeHandleBackground": "#500094ff" }, "tabs": { + "liveIndicator": "#ff0000", + "rerunIndicator": "#c7c715", "dividerLine": "#b4d7ff", "highlighted": { "backgrounds": { diff --git a/src/singletons/Theme.cpp b/src/singletons/Theme.cpp index e89c31f9..f7d3b080 100644 --- a/src/singletons/Theme.cpp +++ b/src/singletons/Theme.cpp @@ -76,6 +76,8 @@ void parseTabs(const QJsonObject &tabs, chatterino::Theme &theme) } }; parseColor(theme, tabs, dividerLine); + parseColor(theme, tabs, liveIndicator); + parseColor(theme, tabs, rerunIndicator); parseTabColors(tabs["regular"_L1].toObject(), theme.tabs.regular); parseTabColors(tabs["newMessage"_L1].toObject(), theme.tabs.newMessage); parseTabColors(tabs["highlighted"_L1].toObject(), theme.tabs.highlighted); diff --git a/src/singletons/Theme.hpp b/src/singletons/Theme.hpp index d67ff8a9..599dcd75 100644 --- a/src/singletons/Theme.hpp +++ b/src/singletons/Theme.hpp @@ -77,6 +77,9 @@ public: TabColors highlighted; TabColors selected; QColor dividerLine; + + QColor liveIndicator; + QColor rerunIndicator; } tabs; /// MESSAGES diff --git a/src/widgets/helper/NotebookTab.cpp b/src/widgets/helper/NotebookTab.cpp index 0db62a81..da04562f 100644 --- a/src/widgets/helper/NotebookTab.cpp +++ b/src/widgets/helper/NotebookTab.cpp @@ -532,13 +532,13 @@ void NotebookTab::paintEvent(QPaintEvent *) QBrush b; if (this->isLive_) { - painter.setPen(QColor(Qt::GlobalColor::red)); - b.setColor(QColor(Qt::GlobalColor::red)); + painter.setPen(this->theme->tabs.liveIndicator); + b.setColor(this->theme->tabs.liveIndicator); } else { - painter.setPen(QColor(Qt::GlobalColor::yellow)); - b.setColor(QColor(Qt::GlobalColor::yellow)); + painter.setPen(this->theme->tabs.rerunIndicator); + b.setColor(this->theme->tabs.rerunIndicator); } painter.setRenderHint(QPainter::Antialiasing);