1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 21:57:35 +00:00

PixelPaint: Use new format functions.

This commit is contained in:
asynts 2020-10-06 14:28:58 +02:00 committed by Andreas Kling
parent 377afff33a
commit 0b29c5e41d
2 changed files with 3 additions and 3 deletions

View file

@ -117,7 +117,7 @@ int main(int argc, char** argv)
auto bitmap = Gfx::Bitmap::load_from_file(open_path.value());
if (!bitmap) {
GUI::MessageBox::show(window, String::format("Failed to load '%s'", open_path.value().characters()), "Open failed", GUI::MessageBox::Type::Error);
GUI::MessageBox::show(window, String::formatted("Failed to load '{}'", open_path.value()), "Open failed", GUI::MessageBox::Type::Error);
return;
}
}));
@ -158,7 +158,7 @@ int main(int argc, char** argv)
if (dialog->exec() == GUI::Dialog::ExecOK) {
auto layer = PixelPaint::Layer::create_with_size(*image_editor.image(), dialog->layer_size(), dialog->layer_name());
if (!layer) {
GUI::MessageBox::show_error(window, String::format("Unable to create layer with size %s", dialog->size().to_string().characters()));
GUI::MessageBox::show_error(window, String::formatted("Unable to create layer with size {}", dialog->size().to_string()));
return;
}
image_editor.image()->add_layer(layer.release_nonnull());