Allow theming of tab live and rerun indicators (#5188)

This commit is contained in:
Mm2PL
2024-02-24 13:26:49 +01:00
committed by GitHub
parent dd61482046
commit df2b5f94f4
9 changed files with 20 additions and 4 deletions
+2
View File
@@ -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);
+3
View File
@@ -77,6 +77,9 @@ public:
TabColors highlighted;
TabColors selected;
QColor dividerLine;
QColor liveIndicator;
QColor rerunIndicator;
} tabs;
/// MESSAGES
+4 -4
View File
@@ -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);