diff options
author | Marcus Nilsson <marcus.nilsson@genarp.com> | 2023-01-11 22:56:29 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-02-02 04:05:42 -0700 |
commit | feef83359d4a406194e61f0b2683d308b2871f3a (patch) | |
tree | 5a5bae88332d79c1594d534f8b26462ba22acfd1 /Userland/Applications/DisplaySettings | |
parent | be464c357a312f4301840de68b6be0f47732bedc (diff) | |
download | serenity-feef83359d4a406194e61f0b2683d308b2871f3a.zip |
DisplaySettings: Made select wallpaper use allowed file types
Diffstat (limited to 'Userland/Applications/DisplaySettings')
-rw-r--r-- | Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp index 03233fbadb..ce37fcbbf2 100644 --- a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp +++ b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp @@ -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(); |