1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:47:46 +00:00

PixelPaint: Display an error message if opening a file fails

This commit is contained in:
Andreas Kling 2021-06-15 01:10:50 +02:00
parent c333aec9f3
commit 8731bc9ead
3 changed files with 48 additions and 38 deletions

View file

@ -38,7 +38,7 @@ protected:
class Image : public RefCounted<Image> {
public:
static RefPtr<Image> try_create_with_size(Gfx::IntSize const&);
static RefPtr<Image> try_create_from_file(String const& file_path);
static Result<NonnullRefPtr<Image>, String> try_create_from_file(String const& file_path);
static RefPtr<Image> try_create_from_bitmap(NonnullRefPtr<Gfx::Bitmap>);
size_t layer_count() const { return m_layers.size(); }
@ -76,7 +76,7 @@ public:
private:
explicit Image(Gfx::IntSize const&);
static RefPtr<Image> try_create_from_pixel_paint_file(String const& file_path);
static Result<NonnullRefPtr<Image>, String> try_create_from_pixel_paint_file(String const& file_path);
void did_change();
void did_modify_layer_stack();