fix: copy filters to overlay window (#5643)

This commit is contained in:
nerix 2024-10-12 12:08:30 +02:00 committed by GitHub
parent bdc12ffb3f
commit bc1850ce2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View file

@ -5,7 +5,7 @@
- Major: Add option to show pronouns in user card. (#5442, #5583) - Major: Add option to show pronouns in user card. (#5442, #5583)
- Major: Release plugins alpha. (#5288) - Major: Release plugins alpha. (#5288)
- Major: Improve high-DPI support on Windows. (#4868, #5391) - Major: Improve high-DPI support on Windows. (#4868, #5391)
- Major: Added transparent overlay window (default keybind: <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>N</kbd>). (#4746) - Major: Added transparent overlay window (default keybind: <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>N</kbd>). (#4746, #5643)
- Minor: Removed the Ctrl+Shift+L hotkey for toggling the "live only" tab visibility state. (#5530) - 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: 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) - Minor: Moved tab visibility control to a submenu, without any toggle actions. (#5530)

View file

@ -85,7 +85,8 @@ namespace chatterino {
using namespace std::chrono_literals; using namespace std::chrono_literals;
OverlayWindow::OverlayWindow(IndirectChannel channel) OverlayWindow::OverlayWindow(IndirectChannel channel,
const QList<QUuid> &filterIDs)
: QWidget(nullptr, : QWidget(nullptr,
Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint)
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -116,6 +117,7 @@ OverlayWindow::OverlayWindow(IndirectChannel channel)
}); });
this->channelView_.installEventFilter(this); this->channelView_.installEventFilter(this);
this->channelView_.setFilters(filterIDs);
this->channelView_.setChannel(this->channel_.get()); this->channelView_.setChannel(this->channel_.get());
this->channelView_.setIsOverlay(true); // use overlay colors this->channelView_.setIsOverlay(true); // use overlay colors
this->channelView_.setAttribute(Qt::WA_TranslucentBackground); this->channelView_.setAttribute(Qt::WA_TranslucentBackground);

View file

@ -21,7 +21,7 @@ class OverlayWindow : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
OverlayWindow(IndirectChannel channel); OverlayWindow(IndirectChannel channel, const QList<QUuid> &filterIDs);
~OverlayWindow() override; ~OverlayWindow() override;
OverlayWindow(const OverlayWindow &) = delete; OverlayWindow(const OverlayWindow &) = delete;
OverlayWindow(OverlayWindow &&) = delete; OverlayWindow(OverlayWindow &&) = delete;

View file

@ -1155,7 +1155,8 @@ void Split::showOverlayWindow()
{ {
if (!this->overlayWindow_) if (!this->overlayWindow_)
{ {
this->overlayWindow_ = new OverlayWindow(this->getIndirectChannel()); this->overlayWindow_ =
new OverlayWindow(this->getIndirectChannel(), this->getFilters());
} }
this->overlayWindow_->show(); this->overlayWindow_->show();
} }