Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: copy filters to overlay window #5643

Merged
merged 4 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading