1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:27:35 +00:00

LibGUI: Add on_return_pressed function to SpinBox

This commit is contained in:
Andrew Smith 2022-03-08 21:07:32 -06:00 committed by Andreas Kling
parent f9940390a3
commit abaecb878b
2 changed files with 5 additions and 0 deletions

View file

@ -35,6 +35,10 @@ SpinBox::SpinBox()
m_editor->on_down_pressed = [this] {
set_value(m_value - 1);
};
m_editor->on_return_pressed = [this] {
if (on_return_pressed)
on_return_pressed();
};
m_increment_button = add<Button>();
m_increment_button->set_button_style(Gfx::ButtonStyle::ThickCap);