mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed the splitoverlay not disappearing when the window is not selected
This commit is contained in:
parent
4d3437e6d1
commit
c27a4eec33
2 changed files with 10 additions and 0 deletions
|
@ -81,6 +81,8 @@ SplitOverlay::SplitOverlay(Split *parent)
|
|||
up->setIconSize(size);
|
||||
down->setIconSize(size);
|
||||
});
|
||||
|
||||
this->setMouseTracking(true);
|
||||
}
|
||||
|
||||
void SplitOverlay::paintEvent(QPaintEvent *event)
|
||||
|
@ -122,6 +124,13 @@ void SplitOverlay::resizeEvent(QResizeEvent *event)
|
|||
this->_down->setVisible(highEnough);
|
||||
}
|
||||
|
||||
void SplitOverlay::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
if ((event->modifiers() & Qt::AltModifier) == 0) {
|
||||
this->hide();
|
||||
}
|
||||
}
|
||||
|
||||
SplitOverlay::ButtonEventFilter::ButtonEventFilter(SplitOverlay *_parent, HoveredElement _element)
|
||||
: QObject(_parent)
|
||||
, parent(_parent)
|
||||
|
|
|
@ -19,6 +19,7 @@ public:
|
|||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
// fourtf: !!! preserve the order of left, up, right and down
|
||||
|
|
Loading…
Reference in a new issue