mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18: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
|
@ -216,7 +216,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
|
|||
cancel_button.set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
|
||||
cancel_button.set_preferred_size(80, 0);
|
||||
cancel_button.set_text("Cancel");
|
||||
cancel_button.on_click = [this] {
|
||||
cancel_button.on_click = [this](auto) {
|
||||
done(ExecCancel);
|
||||
};
|
||||
|
||||
|
@ -224,7 +224,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
|
|||
ok_button.set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
|
||||
ok_button.set_preferred_size(80, 0);
|
||||
ok_button.set_text(ok_button_name(m_mode));
|
||||
ok_button.on_click = [this] {
|
||||
ok_button.on_click = [this](auto) {
|
||||
on_file_return();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue