RunWindow: Center FilePicker window within the entire screen

It doesn't make much sense since to center run window within the parent
window since it's created in the bottom left corner of the screen.
This commit is contained in:
LuK1337 2021-07-14 12:05:57 +02:00 committed by Gunnar Beutner
parent ba119029dd
commit 16006e2d8e
Notes: sideshowbarker 2024-07-18 07:56:21 +09:00

View file

@ -62,7 +62,7 @@ RunWindow::RunWindow()
m_browse_button = *find_descendant_of_type_named<GUI::Button>("browse_button");
m_browse_button->on_click = [this](auto) {
Optional<String> path = GUI::FilePicker::get_open_filepath(this);
Optional<String> path = GUI::FilePicker::get_open_filepath(this, {}, Core::StandardPaths::home_directory(), false, GUI::Dialog::ScreenPosition::Center);
if (path.has_value())
m_path_combo_box->set_text(path.value().view());
};