fix: copy filters to overlay window (#5643)
This commit is contained in:
@@ -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
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user