Browse Source

FontEditor: Filter files by BitmapFont in FilePicker

thankyouverycool 2 years ago
parent
commit
587c44cfbb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Userland/Applications/FontEditor/MainWidget.cpp

+ 3 - 1
Userland/Applications/FontEditor/MainWidget.cpp

@@ -130,7 +130,9 @@ ErrorOr<void> MainWidget::create_actions()
     m_open_action = GUI::CommonActions::make_open_action([this](auto&) {
         if (!request_close())
             return;
-        auto response = FileSystemAccessClient::Client::the().open_file(window(), "Open font file", "/res/fonts"sv);
+        auto response = FileSystemAccessClient::Client::the().open_file(window(), "Open", "/res/fonts"sv, Core::File::OpenMode::Read,
+            { { GUI::FileTypeFilter { "Bitmap Font Files", { { "font" } } },
+                GUI::FileTypeFilter::all_files() } });
         if (response.is_error())
             return;
         auto file = response.release_value();