Skip to content

Commit

Permalink
fix: copy filters to overlay window (#5643)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz authored Oct 12, 2024
1 parent bdc12ff commit bc1850c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <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: 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)
Expand Down
4 changes: 3 additions & 1 deletion src/widgets/OverlayWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ namespace chatterino {

using namespace std::chrono_literals;

OverlayWindow::OverlayWindow(IndirectChannel channel)
OverlayWindow::OverlayWindow(IndirectChannel channel,
const QList<QUuid> &filterIDs)
: QWidget(nullptr,
Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint)
#ifdef Q_OS_WIN
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/OverlayWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class OverlayWindow : public QWidget
{
Q_OBJECT
public:
OverlayWindow(IndirectChannel channel);
OverlayWindow(IndirectChannel channel, const QList<QUuid> &filterIDs);
~OverlayWindow() override;
OverlayWindow(const OverlayWindow &) = delete;
OverlayWindow(OverlayWindow &&) = delete;
Expand Down
3 changes: 2 additions & 1 deletion src/widgets/splits/Split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit bc1850c

Please sign in to comment.