mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Removed help tooltip for splits (#1728)
This commit is contained in:
parent
666b577bd5
commit
5e0ac814cf
2 changed files with 0 additions and 35 deletions
|
@ -676,40 +676,6 @@ void SplitHeader::mousePressEvent(QMouseEvent *event)
|
||||||
|
|
||||||
void SplitHeader::mouseReleaseEvent(QMouseEvent *event)
|
void SplitHeader::mouseReleaseEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (this->dragging_ && event->button() == Qt::LeftButton)
|
|
||||||
{
|
|
||||||
auto pos = event->globalPos();
|
|
||||||
|
|
||||||
if (!showingHelpTooltip_)
|
|
||||||
{
|
|
||||||
this->showingHelpTooltip_ = true;
|
|
||||||
|
|
||||||
QTimer::singleShot(400, this, [this, pos] {
|
|
||||||
if (this->doubleClicked_)
|
|
||||||
{
|
|
||||||
this->doubleClicked_ = false;
|
|
||||||
this->showingHelpTooltip_ = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto tooltip = new TooltipWidget();
|
|
||||||
|
|
||||||
tooltip->setText("Double click or press <Ctrl+R> to change the "
|
|
||||||
"channel.\nClick and "
|
|
||||||
"drag to move the split.");
|
|
||||||
tooltip->setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
tooltip->move(pos);
|
|
||||||
tooltip->show();
|
|
||||||
tooltip->raise();
|
|
||||||
|
|
||||||
QTimer::singleShot(3000, tooltip, [this, tooltip] {
|
|
||||||
tooltip->close();
|
|
||||||
this->showingHelpTooltip_ = false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this->dragging_ = false;
|
this->dragging_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,6 @@ private:
|
||||||
QPoint dragStart_{};
|
QPoint dragStart_{};
|
||||||
bool dragging_{false};
|
bool dragging_{false};
|
||||||
bool doubleClicked_{false};
|
bool doubleClicked_{false};
|
||||||
bool showingHelpTooltip_{false};
|
|
||||||
bool menuVisible_{false};
|
bool menuVisible_{false};
|
||||||
|
|
||||||
// signals
|
// signals
|
||||||
|
|
Loading…
Reference in a new issue