diff options
author | Karol Kosek <krkk@serenityos.org> | 2022-05-27 19:36:06 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-06-02 22:33:00 +0200 |
commit | 9f1f1b8472d0616cea720b1655bb87137122ab92 (patch) | |
tree | b5e114dc6efc3682904e0382aa3decb923b64bb6 /Userland/Applications/Run | |
parent | a232395b7738df4a10dd64ef6b01530a64e1a8e3 (diff) | |
download | serenity-9f1f1b8472d0616cea720b1655bb87137122ab92.zip |
Userland: Use default buttons instead of manually handling return press
Besides simplifying the code, this will also draw outline for these
buttons as a cue for a user!
Diffstat (limited to 'Userland/Applications/Run')
-rw-r--r-- | Userland/Applications/Run/RunWindow.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Applications/Run/RunWindow.cpp b/Userland/Applications/Run/RunWindow.cpp index 6dcc87dd48..26b8cd7a02 100644 --- a/Userland/Applications/Run/RunWindow.cpp +++ b/Userland/Applications/Run/RunWindow.cpp @@ -48,14 +48,12 @@ RunWindow::RunWindow() m_path_combo_box = *main_widget.find_descendant_of_type_named<GUI::ComboBox>("path"); m_path_combo_box->set_model(m_path_history_model); m_path_combo_box->set_selected_index(0); - m_path_combo_box->on_return_pressed = [this] { - m_ok_button->click(); - }; m_ok_button = *main_widget.find_descendant_of_type_named<GUI::Button>("ok_button"); m_ok_button->on_click = [this](auto) { do_run(); }; + m_ok_button->set_default(true); m_cancel_button = *main_widget.find_descendant_of_type_named<GUI::Button>("cancel_button"); m_cancel_button->on_click = [this](auto) { |