1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:18:12 +00:00

LibGUI+LoginServer: Use default buttons in InputBox and LoginWindow

This commit is contained in:
thankyouverycool 2022-01-24 14:29:21 -05:00 committed by Andreas Kling
parent f77ac3a73c
commit 7beea36052
2 changed files with 2 additions and 6 deletions

View file

@ -92,6 +92,7 @@ void InputBox::build(InputType input_type)
m_text_value = m_text_editor->text();
done(ExecOK);
};
m_ok_button->set_default(true);
m_cancel_button = button_container_inner.add<Button>();
m_cancel_button->set_text("Cancel");
@ -100,9 +101,6 @@ void InputBox::build(InputType input_type)
done(ExecCancel);
};
m_text_editor->on_return_pressed = [this] {
m_ok_button->click();
};
m_text_editor->on_escape_pressed = [this] {
m_cancel_button->click();
};