mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Allow theming of tab live and rerun indicators (#5188)
This commit is contained in:
parent
dd61482046
commit
df2b5f94f4
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
"resizeHandleBackground": "#200094ff"
|
||||
},
|
||||
"tabs": {
|
||||
"liveIndicator": "#ff0000",
|
||||
"rerunIndicator": "#c7c715",
|
||||
"dividerLine": "#555555",
|
||||
"highlighted": {
|
||||
"backgrounds": {
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
"resizeHandleBackground": "#200094ff"
|
||||
},
|
||||
"tabs": {
|
||||
"liveIndicator": "#ff0000",
|
||||
"rerunIndicator": "#c7c715",
|
||||
"dividerLine": "#555555",
|
||||
"highlighted": {
|
||||
"backgrounds": {
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
"resizeHandleBackground": "#500094ff"
|
||||
},
|
||||
"tabs": {
|
||||
"liveIndicator": "#ff0000",
|
||||
"rerunIndicator": "#c7c715",
|
||||
"dividerLine": "#b4d7ff",
|
||||
"highlighted": {
|
||||
"backgrounds": {
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
"resizeHandleBackground": "#500094ff"
|
||||
},
|
||||
"tabs": {
|
||||
"liveIndicator": "#ff0000",
|
||||
"rerunIndicator": "#c7c715",
|
||||
"dividerLine": "#b4d7ff",
|
||||
"highlighted": {
|
||||
"backgrounds": {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -77,6 +77,9 @@ public:
|
|||
TabColors highlighted;
|
||||
TabColors selected;
|
||||
QColor dividerLine;
|
||||
|
||||
QColor liveIndicator;
|
||||
QColor rerunIndicator;
|
||||
} tabs;
|
||||
|
||||
/// MESSAGES
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue