mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:58:11 +00:00
Run: Use the new DialogButton
This commit is contained in:
parent
992ff4bd63
commit
fc3fd7212f
2 changed files with 6 additions and 9 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue