diff options
author | FrHun <28605587+frhun@users.noreply.github.com> | 2022-06-10 23:08:10 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-06-10 23:02:07 +0100 |
commit | fc3fd7212f4f40a9e1405f5d35679fe6e9a6d6e4 (patch) | |
tree | acb301d88f99b4960b95f06b11e94664aef3edf9 /Userland | |
parent | 992ff4bd6329e29ade318632b0c946f03a25939f (diff) | |
download | serenity-fc3fd7212f4f40a9e1405f5d35679fe6e9a6d6e4.zip |
Run: Use the new DialogButton
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/Run/Run.gml | 9 | ||||
-rw-r--r-- | Userland/Applications/Run/RunWindow.cpp | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/Userland/Applications/Run/Run.gml b/Userland/Applications/Run/Run.gml index 0ac27a4b68..5c183e419e 100644 --- a/Userland/Applications/Run/Run.gml +++ b/Userland/Applications/Run/Run.gml @@ -43,22 +43,19 @@ @GUI::Layout::Spacer {} - @GUI::Button { + @GUI::DialogButton { name: "ok_button" text: "OK" - fixed_width: 80 } - @GUI::Button { + @GUI::DialogButton { name: "cancel_button" text: "Cancel" - fixed_width: 80 } - @GUI::Button { + @GUI::DialogButton { name: "browse_button" text: "Browse..." - fixed_width: 80 } } } diff --git a/Userland/Applications/Run/RunWindow.cpp b/Userland/Applications/Run/RunWindow.cpp index 26b8cd7a02..de18e987ce 100644 --- a/Userland/Applications/Run/RunWindow.cpp +++ b/Userland/Applications/Run/RunWindow.cpp @@ -49,18 +49,18 @@ RunWindow::RunWindow() m_path_combo_box->set_model(m_path_history_model); m_path_combo_box->set_selected_index(0); - m_ok_button = *main_widget.find_descendant_of_type_named<GUI::Button>("ok_button"); + m_ok_button = *main_widget.find_descendant_of_type_named<GUI::DialogButton>("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 = *main_widget.find_descendant_of_type_named<GUI::DialogButton>("cancel_button"); m_cancel_button->on_click = [this](auto) { close(); }; - m_browse_button = *find_descendant_of_type_named<GUI::Button>("browse_button"); + m_browse_button = *find_descendant_of_type_named<GUI::DialogButton>("browse_button"); m_browse_button->on_click = [this](auto) { Optional<String> path = GUI::FilePicker::get_open_filepath(this, {}, Core::StandardPaths::home_directory(), false, GUI::Dialog::ScreenPosition::Center); if (path.has_value()) |