From abaecb878b44a7f56fc1d8e1eb6391739f7389ea Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Tue, 8 Mar 2022 21:07:32 -0600 Subject: [PATCH] LibGUI: Add on_return_pressed function to SpinBox --- Userland/Libraries/LibGUI/SpinBox.cpp | 4 ++++ Userland/Libraries/LibGUI/SpinBox.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Userland/Libraries/LibGUI/SpinBox.cpp b/Userland/Libraries/LibGUI/SpinBox.cpp index 59676e85873..1c858f9bcf1 100644 --- a/Userland/Libraries/LibGUI/SpinBox.cpp +++ b/Userland/Libraries/LibGUI/SpinBox.cpp @@ -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