diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-05-12 22:03:24 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-05-12 22:03:24 +0200 |
commit | f0a28851afb5fdb21431494633c86c01947ed0db (patch) | |
tree | c37818f81920e8555137550f9b16bcd16d2451a5 /plugingui | |
parent | 590f3727e594bccbd486cd6742d239c923f9f4db (diff) |
Remove tooltip when clicked.
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/tooltip.cc | 8 | ||||
-rw-r--r-- | plugingui/tooltip.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/plugingui/tooltip.cc b/plugingui/tooltip.cc index 499ab14..19bc89b 100644 --- a/plugingui/tooltip.cc +++ b/plugingui/tooltip.cc @@ -185,4 +185,12 @@ void Tooltip::show() window()->setMouseFocus(this); } +void Tooltip::buttonEvent(ButtonEvent* buttonEvent) +{ + if(buttonEvent->direction == Direction::down) + { + hide(); + } +} + } // GUI:: diff --git a/plugingui/tooltip.h b/plugingui/tooltip.h index b449512..9d1619d 100644 --- a/plugingui/tooltip.h +++ b/plugingui/tooltip.h @@ -53,6 +53,7 @@ public: virtual void resize(std::size_t height, std::size_t width) override; virtual void mouseLeaveEvent() override; virtual void show() override; + virtual void buttonEvent(ButtonEvent* buttonEvent) override; private: void preprocessText(); |