diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-12 20:30:33 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-12 20:31:16 +0200 |
commit | 977863ea078e829df10d351a2e9ac3097fb8f5d9 (patch) | |
tree | 5ea075feaa74d0ff74381399c85cae1bfbaaa6b0 /Libraries/LibGUI/InputBox.cpp | |
parent | 3a905aed063e84331aec82826926cdb89d777892 (diff) | |
download | serenity-977863ea078e829df10d351a2e9ac3097fb8f5d9.zip |
LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking
a button.
Diffstat (limited to 'Libraries/LibGUI/InputBox.cpp')
-rw-r--r-- | Libraries/LibGUI/InputBox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGUI/InputBox.cpp b/Libraries/LibGUI/InputBox.cpp index 9d6025f4e4..e8322a68cc 100644 --- a/Libraries/LibGUI/InputBox.cpp +++ b/Libraries/LibGUI/InputBox.cpp @@ -83,7 +83,7 @@ void InputBox::build() m_ok_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed); m_ok_button->set_preferred_size(0, 20); m_ok_button->set_text("OK"); - m_ok_button->on_click = [this] { + m_ok_button->on_click = [this](auto) { dbgprintf("GUI::InputBox: OK button clicked\n"); m_text_value = m_text_editor->text(); done(ExecOK); @@ -93,7 +93,7 @@ void InputBox::build() m_cancel_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed); m_cancel_button->set_preferred_size(0, 20); m_cancel_button->set_text("Cancel"); - m_cancel_button->on_click = [this] { + m_cancel_button->on_click = [this](auto) { dbgprintf("GUI::InputBox: Cancel button clicked\n"); done(ExecCancel); }; |