diff --git a/CHANGELOG.md b/CHANGELOG.md index 915fe939..e4ca645b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ - Minor: Opening streamlink through hotkeys and/or split header menu matches `/streamlink` command and shows feedback in chat as well. (#3510) - Minor: Removed timestamp from AutoMod messages. (#3503) - Minor: Added ability to copy message ID with `Shift + Right Click`. (#3481) +- Minor: Colorize the entire split header when focused. (#3379) - Bugfix: Fix Split Input hotkeys not being available when input is hidden (#3362) - Bugfix: Fixed colored usernames sometimes not working. (#3170) - Bugfix: Restored ability to send duplicate `/me` messages. (#3166) diff --git a/src/singletons/Theme.cpp b/src/singletons/Theme.cpp index 2e73d170..bc506f9a 100644 --- a/src/singletons/Theme.cpp +++ b/src/singletons/Theme.cpp @@ -62,8 +62,11 @@ void Theme::actuallyUpdate(double hue, double multiplier) this->splits.header.background = getColor(0, sat, flat ? 1 : 0.9); this->splits.header.border = getColor(0, sat, flat ? 1 : 0.85); this->splits.header.text = this->messages.textColors.regular; - this->splits.header.focusedText = - isLight ? QColor("#198CFF") : QColor("#84C1FF"); + this->splits.header.focusedBackground = + getColor(0, sat, isLight ? 0.95 : 0.79); + this->splits.header.focusedBorder = getColor(0, sat, isLight ? 0.90 : 0.78); + this->splits.header.focusedText = QColor::fromHsvF( + 0.58388, isLight ? 1.0 : 0.482, isLight ? 0.6375 : 1.0); this->splits.input.background = getColor(0, sat, flat ? 0.95 : 0.95); this->splits.input.border = getColor(0, sat, flat ? 1 : 1); diff --git a/src/singletons/Theme.hpp b/src/singletons/Theme.hpp index f2f8621b..9af05f54 100644 --- a/src/singletons/Theme.hpp +++ b/src/singletons/Theme.hpp @@ -31,7 +31,9 @@ public: struct { QColor border; + QColor focusedBorder; QColor background; + QColor focusedBackground; QColor text; QColor focusedText; // int margin; diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 1ddda08d..6e8ca0c4 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -785,11 +785,19 @@ void SplitHeader::paintEvent(QPaintEvent *) { QPainter painter(this); - painter.fillRect(rect(), this->theme->splits.header.background); - painter.setPen(this->theme->splits.header.border); + QColor background = this->theme->splits.header.background; + QColor border = this->theme->splits.header.border; + + if (this->split_->hasFocus()) + { + background = this->theme->splits.header.focusedBackground; + border = this->theme->splits.header.focusedBorder; + } + + painter.fillRect(rect(), background); + painter.setPen(border); painter.drawRect(0, 0, width() - 1, height() - 2); - painter.fillRect(0, height() - 1, width(), 1, - this->theme->splits.background); + painter.fillRect(0, height() - 1, width(), 1, background); } void SplitHeader::mousePressEvent(QMouseEvent *event) @@ -909,6 +917,8 @@ void SplitHeader::themeChangedEvent() this->dropdownButton_->setPixmap(getResources().buttons.menuLight); this->addButton_->setPixmap(getResources().buttons.addSplitDark); } + + this->update(); } void SplitHeader::reloadChannelEmotes()