Prevent emoji selector for closing

fixes #176
remotes/origin/HEAD
Konstantinos Sideris 7 years ago
parent f11044b5eb
commit aaa4d8c323
  1. 1
      include/emoji/PickButton.h
  2. 18
      src/emoji/PickButton.cc

@ -37,7 +37,6 @@ signals:
protected:
void enterEvent(QEvent *e) override;
void leaveEvent(QEvent *e) override;
private:
// Vertical distance from panel's bottom.

@ -46,21 +46,3 @@ PickButton::enterEvent(QEvent *e)
panel_->move(x, y);
panel_->show();
}
void
PickButton::leaveEvent(QEvent *e)
{
Q_UNUSED(e);
if (panel_->underMouse())
return;
auto pos = QCursor::pos();
auto panel_geometry = panel_->geometry();
panel_geometry.adjust(0, 0, 0, vertical_distance_);
if (panel_geometry.contains(pos))
return;
panel_->hide();
}

Loading…
Cancel
Save