From 3d4a716974187d112abf21af68e66fd6199a8d59 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Sat, 12 Oct 2024 11:16:04 +0200 Subject: [PATCH 1/3] fix: copy filters to overlay window --- src/widgets/OverlayWindow.cpp | 4 +++- src/widgets/OverlayWindow.hpp | 2 +- src/widgets/splits/Split.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/widgets/OverlayWindow.cpp b/src/widgets/OverlayWindow.cpp index f81ebf0ca86..94811fa8719 100644 --- a/src/widgets/OverlayWindow.cpp +++ b/src/widgets/OverlayWindow.cpp @@ -85,7 +85,8 @@ namespace chatterino { using namespace std::chrono_literals; -OverlayWindow::OverlayWindow(IndirectChannel channel) +OverlayWindow::OverlayWindow(IndirectChannel channel, + const QList &filterIDs) : QWidget(nullptr, Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) #ifdef Q_OS_WIN @@ -116,6 +117,7 @@ OverlayWindow::OverlayWindow(IndirectChannel channel) }); this->channelView_.installEventFilter(this); + this->channelView_.setFilters(filterIDs); this->channelView_.setChannel(this->channel_.get()); this->channelView_.setIsOverlay(true); // use overlay colors this->channelView_.setAttribute(Qt::WA_TranslucentBackground); diff --git a/src/widgets/OverlayWindow.hpp b/src/widgets/OverlayWindow.hpp index 322dae468ab..f1c61362f8e 100644 --- a/src/widgets/OverlayWindow.hpp +++ b/src/widgets/OverlayWindow.hpp @@ -21,7 +21,7 @@ class OverlayWindow : public QWidget { Q_OBJECT public: - OverlayWindow(IndirectChannel channel); + OverlayWindow(IndirectChannel channel, const QList &filterIDs); ~OverlayWindow() override; OverlayWindow(const OverlayWindow &) = delete; OverlayWindow(OverlayWindow &&) = delete; diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index 2356653d628..195e71c6b02 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -1155,7 +1155,8 @@ void Split::showOverlayWindow() { if (!this->overlayWindow_) { - this->overlayWindow_ = new OverlayWindow(this->getIndirectChannel()); + this->overlayWindow_ = + new OverlayWindow(this->getIndirectChannel(), this->getFilters()); } this->overlayWindow_->show(); } From b948d1d626a1cc5702eabba9e5cf90b031a5fc4e Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Sat, 12 Oct 2024 11:18:38 +0200 Subject: [PATCH 2/3] chore: add to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b0d1e7fb21..246895e2c50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - Major: Add option to show pronouns in user card. (#5442, #5583) - Major: Release plugins alpha. (#5288) - Major: Improve high-DPI support on Windows. (#4868, #5391) -- Major: Added transparent overlay window (default keybind: CTRL + ALT + N). (#4746) +- Major: Added transparent overlay window (default keybind: CTRL + ALT + N). (#474, #5643) - Minor: Removed the Ctrl+Shift+L hotkey for toggling the "live only" tab visibility state. (#5530) - Minor: Add support for Shared Chat messages. Shared chat messages can be filtered with the `flags.shared` filter variable, or with search using `is:shared`. Some messages like subscriptions are filtered on purpose to avoid confusion for the broadcaster. If you have both channels participating in Shared Chat open, only one of the message triggering your highlight will trigger. (#5606, #5625) - Minor: Moved tab visibility control to a submenu, without any toggle actions. (#5530) From e63d25583159b40eef43e0a0fe61b8442b65db08 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Sat, 12 Oct 2024 11:30:41 +0200 Subject: [PATCH 3/3] fix: changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 246895e2c50..463f5b73e84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - Major: Add option to show pronouns in user card. (#5442, #5583) - Major: Release plugins alpha. (#5288) - Major: Improve high-DPI support on Windows. (#4868, #5391) -- Major: Added transparent overlay window (default keybind: CTRL + ALT + N). (#474, #5643) +- Major: Added transparent overlay window (default keybind: CTRL + ALT + N). (#4746, #5643) - Minor: Removed the Ctrl+Shift+L hotkey for toggling the "live only" tab visibility state. (#5530) - Minor: Add support for Shared Chat messages. Shared chat messages can be filtered with the `flags.shared` filter variable, or with search using `is:shared`. Some messages like subscriptions are filtered on purpose to avoid confusion for the broadcaster. If you have both channels participating in Shared Chat open, only one of the message triggering your highlight will trigger. (#5606, #5625) - Minor: Moved tab visibility control to a submenu, without any toggle actions. (#5530)