mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
LibGUI+LoginServer: Use default buttons in InputBox and LoginWindow
This commit is contained in:
parent
f77ac3a73c
commit
7beea36052
2 changed files with 2 additions and 6 deletions
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -35,7 +35,5 @@ LoginWindow::LoginWindow(GUI::Window* parent)
|
|||
if (on_submit)
|
||||
on_submit();
|
||||
};
|
||||
|
||||
m_username->on_return_pressed = [&]() { m_log_in_button->click(); };
|
||||
m_password->on_return_pressed = [&]() { m_log_in_button->click(); };
|
||||
m_log_in_button->set_default(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue