summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/tooltip.cc8
-rw-r--r--plugingui/tooltip.h1
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();