1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-28 21:02:07 +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:
Andreas Kling 2020-03-03 17:02:38 +01:00
parent b1d35248e4
commit a26b63a958
26 changed files with 60 additions and 55 deletions

View file

@ -45,12 +45,12 @@ SpinBox::SpinBox()
m_increment_button = add<Button>();
m_increment_button->set_focusable(false);
m_increment_button->set_text("\xc3\xb6");
m_increment_button->on_click = [this](auto&) { set_value(m_value + 1); };
m_increment_button->on_click = [this] { set_value(m_value + 1); };
m_increment_button->set_auto_repeat_interval(150);
m_decrement_button = add<Button>();
m_decrement_button->set_focusable(false);
m_decrement_button->set_text("\xc3\xb7");
m_decrement_button->on_click = [this](auto&) { set_value(m_value - 1); };
m_decrement_button->on_click = [this] { set_value(m_value - 1); };
m_decrement_button->set_auto_repeat_interval(150);
}