summary refs log tree commit diff
path: root/include/emoji/PickButton.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-04-08 15:49:53 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-04-08 15:49:53 +0300
commit5125433552eb905fe228febc4961bca404f6bae2 (patch)
tree328af902848286d4222bb738ea6125868262f0c4 /include/emoji/PickButton.h
parentBump version (diff)
downloadnheko-5125433552eb905fe228febc4961bca404f6bae2.tar.xz
Hide emoji panel if it's not under the mouse cursor
fixes #254
fixes #246
Diffstat (limited to 'include/emoji/PickButton.h')
-rw-r--r--include/emoji/PickButton.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/emoji/PickButton.h b/include/emoji/PickButton.h
index 9c30a549..9117e61f 100644
--- a/include/emoji/PickButton.h
+++ b/include/emoji/PickButton.h
@@ -18,6 +18,7 @@
 #pragma once
 
 #include <QEvent>
+#include <QTimer>
 #include <QWidget>
 
 #include "FlatButton.h"
@@ -37,6 +38,7 @@ signals:
 
 protected:
         void enterEvent(QEvent *e) override;
+        void leaveEvent(QEvent *e) override;
 
 private:
         // Vertical distance from panel's bottom.
@@ -46,5 +48,6 @@ private:
         int horizontal_distance_ = 70;
 
         QSharedPointer<Panel> panel_;
+        QTimer hideTimer_;
 };
 } // namespace emoji