1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

DisplaySettings: Pass the parent window to the FilePicker

Prior this change, closing the Display Settings application
didn't close the File Picker.
This commit is contained in:
Karol Kosek 2021-08-07 23:07:08 +02:00 committed by Andreas Kling
parent e2ad59ce06
commit e8fad5614e

View file

@ -61,7 +61,7 @@ void BackgroundSettingsWidget::create_frame()
auto& button = *find_descendant_of_type_named<GUI::Button>("wallpaper_open_button");
button.on_click = [this](auto) {
auto path = GUI::FilePicker::get_open_filepath(nullptr, "Select wallpaper from file system", "/res/wallpapers");
auto path = GUI::FilePicker::get_open_filepath(window(), "Select wallpaper from file system", "/res/wallpapers");
if (!path.has_value())
return;
m_wallpaper_view->selection().clear();