mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:37:45 +00:00
PixelPaint: Export images using the editor title as a default basename
This commit is contained in:
parent
fbf91f41e7
commit
f4aba71fc1
1 changed files with 3 additions and 3 deletions
|
@ -171,7 +171,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
"As &BMP", [&](auto&) {
|
"As &BMP", [&](auto&) {
|
||||||
auto* editor = current_image_editor();
|
auto* editor = current_image_editor();
|
||||||
VERIFY(editor);
|
VERIFY(editor);
|
||||||
auto response = FileSystemAccessClient::Client::the().try_save_file(&window, "untitled", "bmp");
|
auto response = FileSystemAccessClient::Client::the().try_save_file(&window, editor->title(), "bmp");
|
||||||
if (response.is_error())
|
if (response.is_error())
|
||||||
return;
|
return;
|
||||||
auto preserve_alpha_channel = GUI::MessageBox::show(&window, "Do you wish to preserve transparency?"sv, "Preserve transparency?"sv, GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo);
|
auto preserve_alpha_channel = GUI::MessageBox::show(&window, "Do you wish to preserve transparency?"sv, "Preserve transparency?"sv, GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo);
|
||||||
|
@ -186,7 +186,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
auto* editor = current_image_editor();
|
auto* editor = current_image_editor();
|
||||||
VERIFY(editor);
|
VERIFY(editor);
|
||||||
// TODO: fix bmp on line below?
|
// TODO: fix bmp on line below?
|
||||||
auto response = FileSystemAccessClient::Client::the().try_save_file(&window, "untitled", "png");
|
auto response = FileSystemAccessClient::Client::the().try_save_file(&window, editor->title(), "png");
|
||||||
if (response.is_error())
|
if (response.is_error())
|
||||||
return;
|
return;
|
||||||
auto preserve_alpha_channel = GUI::MessageBox::show(&window, "Do you wish to preserve transparency?"sv, "Preserve transparency?"sv, GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo);
|
auto preserve_alpha_channel = GUI::MessageBox::show(&window, "Do you wish to preserve transparency?"sv, "Preserve transparency?"sv, GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo);
|
||||||
|
@ -200,7 +200,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
"As &QOI", [&](auto&) {
|
"As &QOI", [&](auto&) {
|
||||||
auto* editor = current_image_editor();
|
auto* editor = current_image_editor();
|
||||||
VERIFY(editor);
|
VERIFY(editor);
|
||||||
auto response = FileSystemAccessClient::Client::the().try_save_file(&window, "untitled", "qoi");
|
auto response = FileSystemAccessClient::Client::the().try_save_file(&window, editor->title(), "qoi");
|
||||||
if (response.is_error())
|
if (response.is_error())
|
||||||
return;
|
return;
|
||||||
auto result = editor->image().export_qoi_to_file(response.value());
|
auto result = editor->image().export_qoi_to_file(response.value());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue