FontEditor: Filter files by BitmapFont in FilePicker
This commit is contained in:
parent
a62f204b25
commit
587c44cfbb
Notes:
sideshowbarker
2024-07-17 07:38:17 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/587c44cfbb Pull-request: https://github.com/SerenityOS/serenity/pull/18875
1 changed files with 3 additions and 1 deletions
|
@ -130,7 +130,9 @@ ErrorOr<void> MainWidget::create_actions()
|
||||||
m_open_action = GUI::CommonActions::make_open_action([this](auto&) {
|
m_open_action = GUI::CommonActions::make_open_action([this](auto&) {
|
||||||
if (!request_close())
|
if (!request_close())
|
||||||
return;
|
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())
|
if (response.is_error())
|
||||||
return;
|
return;
|
||||||
auto file = response.release_value();
|
auto file = response.release_value();
|
||||||
|
|
Loading…
Add table
Reference in a new issue