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 /Demos | |
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 'Demos')
-rw-r--r-- | Demos/HelloWorld/main.cpp | 2 | ||||
-rw-r--r-- | Demos/WidgetGallery/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Demos/HelloWorld/main.cpp b/Demos/HelloWorld/main.cpp index 7bbe69a1dc..79e6934926 100644 --- a/Demos/HelloWorld/main.cpp +++ b/Demos/HelloWorld/main.cpp @@ -52,7 +52,7 @@ int main(int argc, char** argv) button.set_text("Good-bye"); button.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed); button.set_preferred_size(0, 20); - button.on_click = [&] { + button.on_click = [&](auto) { app.quit(); }; diff --git a/Demos/WidgetGallery/main.cpp b/Demos/WidgetGallery/main.cpp index 58f6ead306..90f38f39f5 100644 --- a/Demos/WidgetGallery/main.cpp +++ b/Demos/WidgetGallery/main.cpp @@ -220,7 +220,7 @@ int main(int argc, char** argv) auto& show_buton = tab_msgbox.add<GUI::Button>("Show"); show_buton.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed); show_buton.set_preferred_size(0, 20); - show_buton.on_click = [&]() { + show_buton.on_click = [&](auto) { GUI::MessageBox::show(content_textbox.text(), title_textbox.text(), msg_box_type, msg_box_input_type, window); }; |