mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
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:
parent
ba119029dd
commit
16006e2d8e
Notes:
sideshowbarker
2024-07-18 07:56:21 +09:00
Author: https://github.com/luk1337
Commit: 16006e2d8e
Pull-request: https://github.com/SerenityOS/serenity/pull/8737
Reviewed-by: https://github.com/metmo
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue