From 997a8cd0794f208d4c148588f42695f2a5d0b3a8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 18 Oct 2014 11:24:43 +0300 Subject: Add tooltips to checkbox. --- src/gui/widgets/checkbox.cpp | 5 +++-- src/gui/widgets/checkbox.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index 15ad7e3ec..96231fd4b 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -89,7 +89,7 @@ CheckBox::CheckBox(const Widget2 *const widget, ActionListener *const listener, const std::string &restrict eventId) : Widget(widget), - MouseListener(), + ToolTipListener(), KeyListener(), mSelected(selected), mCaption(), @@ -233,9 +233,10 @@ void CheckBox::mouseEntered(MouseEvent& event A_UNUSED) mHasMouse = true; } -void CheckBox::mouseExited(MouseEvent& event A_UNUSED) +void CheckBox::mouseExited(MouseEvent& event) { mHasMouse = false; + ToolTipListener::mouseExited(event); } void CheckBox::keyPressed(KeyEvent& event) diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h index 41f168048..03872a154 100644 --- a/src/gui/widgets/checkbox.h +++ b/src/gui/widgets/checkbox.h @@ -67,7 +67,7 @@ #define GUI_WIDGETS_CHECKBOX_H #include "listeners/keylistener.h" -#include "listeners/mouselistener.h" +#include "listeners/tooltiplistener.h" #include "gui/widgets/widget.h" @@ -81,7 +81,7 @@ class Skin; * \ingroup GUI */ class CheckBox final : public Widget, - public MouseListener, + public ToolTipListener, public KeyListener { public: -- cgit v1.2.3-70-g09d2