mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
add mouseMove signal to SignalLabel
Make use of the mouseMove signal in SplitHeader for the stream uptime tooltip
This commit is contained in:
parent
1c7f397f1b
commit
1b9fa36e06
|
@ -30,5 +30,6 @@ void SignalLabel::mouseReleaseEvent(QMouseEvent *event)
|
||||||
|
|
||||||
void SignalLabel::mouseMoveEvent(QMouseEvent *event)
|
void SignalLabel::mouseMoveEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
|
emit this->mouseMove(event);
|
||||||
event->ignore();
|
event->ignore();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ signals:
|
||||||
|
|
||||||
void mouseDown();
|
void mouseDown();
|
||||||
void mouseUp();
|
void mouseUp();
|
||||||
|
void mouseMove(QMouseEvent *event);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mouseDoubleClickEvent(QMouseEvent *ev) override;
|
void mouseDoubleClickEvent(QMouseEvent *ev) override;
|
||||||
|
|
|
@ -57,6 +57,7 @@ SplitHeader::SplitHeader(Split *_split)
|
||||||
title->setMouseTracking(true);
|
title->setMouseTracking(true);
|
||||||
QObject::connect(this->titleLabel, &SignalLabel::mouseDoubleClick, this,
|
QObject::connect(this->titleLabel, &SignalLabel::mouseDoubleClick, this,
|
||||||
&SplitHeader::mouseDoubleClickEvent);
|
&SplitHeader::mouseDoubleClickEvent);
|
||||||
|
QObject::connect(this->titleLabel, &SignalLabel::mouseMove, this, &SplitHeader::mouseMoveEvent);
|
||||||
|
|
||||||
layout->addStretch(1);
|
layout->addStretch(1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue