summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2018-06-08 12:36:14 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2018-06-08 12:36:14 +0200
commitc00110f801ae9de05a7f4c250918e4c05588b1d9 (patch)
tree1e781904ec1810421c05706eb5f3365e97c173e5 /plugingui
parent3eee5daaf9535f064d37c31c118ca93576571933 (diff)
Fix weird spacebar toggle of powerbutton.
Diffstat (limited to 'plugingui')
-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;