summaryrefslogtreecommitdiff
path: root/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp
diff options
context:
space:
mode:
authorMarcus Nilsson <marcus.nilsson@genarp.com>2023-01-11 22:56:29 +0100
committerAndrew Kaster <andrewdkaster@gmail.com>2023-02-02 04:05:42 -0700
commitfeef83359d4a406194e61f0b2683d308b2871f3a (patch)
tree5a5bae88332d79c1594d534f8b26462ba22acfd1 /Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp
parentbe464c357a312f4301840de68b6be0f47732bedc (diff)
downloadserenity-feef83359d4a406194e61f0b2683d308b2871f3a.zip
DisplaySettings: Made select wallpaper use allowed file types
Diffstat (limited to 'Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp')
-rw-r--r--Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp3
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();