diff --git a/include/emoji/PickButton.h b/include/emoji/PickButton.h index d0026828..9c30a549 100644 --- a/include/emoji/PickButton.h +++ b/include/emoji/PickButton.h @@ -37,7 +37,6 @@ signals: protected: void enterEvent(QEvent *e) override; - void leaveEvent(QEvent *e) override; private: // Vertical distance from panel's bottom. diff --git a/src/emoji/PickButton.cc b/src/emoji/PickButton.cc index ca3b3017..530c951b 100644 --- a/src/emoji/PickButton.cc +++ b/src/emoji/PickButton.cc @@ -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(); -}