mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
DisplaySettings: Made select wallpaper use allowed file types
This commit is contained in:
parent
be464c357a
commit
feef83359d
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <LibGUI/Desktop.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/FileSystemModel.h>
|
||||
#include <LibGUI/FileTypeFilter.h>
|
||||
#include <LibGUI/IconView.h>
|
||||
#include <LibGUI/ItemListModel.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
|
@ -86,7 +87,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(window(), "Select wallpaper from file system", "/res/wallpapers"sv);
|
||||
auto path = GUI::FilePicker::get_open_filepath(window(), "Select wallpaper from file system", "/res/wallpapers"sv, false, GUI::Dialog::ScreenPosition::CenterWithinParent, { { GUI::FileTypeFilter::image_files(), GUI::FileTypeFilter::all_files() } });
|
||||
if (!path.has_value())
|
||||
return;
|
||||
m_wallpaper_view->selection().clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue