mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:55:10 +00:00
LibGUI: Remove Button& parameter from Button::on_click hook
There was but a single user of this parameter and it's a bit tedious to write it out every time, so let's get rid of it.
This commit is contained in:
parent
b1d35248e4
commit
a26b63a958
26 changed files with 60 additions and 55 deletions
|
@ -210,7 +210,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](auto&) {
|
||||
cancel_button->on_click = [this] {
|
||||
done(ExecCancel);
|
||||
};
|
||||
|
||||
|
@ -218,7 +218,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](auto&) {
|
||||
ok_button->on_click = [this] {
|
||||
on_file_return();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue