mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +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:
parent
3a905aed06
commit
977863ea07
37 changed files with 76 additions and 76 deletions
|
@ -102,13 +102,13 @@ PowerDialog::PowerDialog()
|
|||
button_box.layout()->set_spacing(8);
|
||||
|
||||
auto& ok_button = button_box.add<GUI::Button>();
|
||||
ok_button.on_click = [this] {
|
||||
ok_button.on_click = [this](auto) {
|
||||
done(ExecResult::ExecOK);
|
||||
};
|
||||
ok_button.set_text("OK");
|
||||
|
||||
auto& cancel_button = button_box.add<GUI::Button>();
|
||||
cancel_button.on_click = [this] {
|
||||
cancel_button.on_click = [this](auto) {
|
||||
done(ExecResult::ExecCancel);
|
||||
};
|
||||
cancel_button.set_text("Cancel");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue