1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibGUI: Include keyboard modifier state with button on_click calls

This will allow you us to implement special behavior when Ctrl+clicking
a button.
This commit is contained in:
Andreas Kling 2020-05-12 20:30:33 +02:00
parent 3a905aed06
commit 977863ea07
37 changed files with 76 additions and 76 deletions

View file

@ -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);
};