summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugingui/toggle.cc18
-rw-r--r--plugingui/toggle.h1
2 files changed, 0 insertions, 19 deletions
diff --git a/plugingui/toggle.cc b/plugingui/toggle.cc
index 6fdb6bc..39587de 100644
--- a/plugingui/toggle.cc
+++ b/plugingui/toggle.cc
@@ -65,24 +65,6 @@ void Toggle::setText(std::string text)
redraw();
}
-void Toggle::keyEvent(KeyEvent* keyEvent)
-{
- if(keyEvent->keycode == Key::character && keyEvent->text == " ")
- {
- if(keyEvent->direction == Direction::up)
- {
- clicked = false;
- internalSetChecked(!state);
- }
- else
- {
- clicked = true;
- }
-
- redraw();
- }
-}
-
bool Toggle::checked()
{
return state;
diff --git a/plugingui/toggle.h b/plugingui/toggle.h
index b599ced..3466459 100644
--- a/plugingui/toggle.h
+++ b/plugingui/toggle.h
@@ -53,7 +53,6 @@ public:
protected:
// From Widget:
virtual void buttonEvent(ButtonEvent* buttonEvent) override;
- virtual void keyEvent(KeyEvent* keyEvent) override;
virtual void mouseLeaveEvent() override;
virtual void mouseEnterEvent() override;