mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +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:
@@ -75,13 +75,13 @@ void ColorPicker::build()
|
||||
auto cancel_button = right_vertical_container->add<Button>("Cancel");
|
||||
cancel_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
cancel_button->set_preferred_size(0, 20);
|
||||
cancel_button->on_click = [&](auto&) {
|
||||
cancel_button->on_click = [&] {
|
||||
done(Dialog::ExecCancel);
|
||||
};
|
||||
auto ok_button = right_vertical_container->add<Button>("Okay");
|
||||
ok_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
ok_button->set_preferred_size(0, 20);
|
||||
ok_button->on_click = [&](auto&) {
|
||||
ok_button->on_click = [&] {
|
||||
done(Dialog::ExecOK);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user