1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:47:34 +00:00

PixelPaint: Make the main UI tabbed and allow multiple open images :^)

This patch adds a GUI::TabWidget to the main UI and allows having
multiple images open at the same time.

Some of the changes here are a bit hackish and mechanical and there's
still code around that needs more work to fit better in the new world.

One nice side-effect of this change is that ImageEditor now always
has one Image associated with it, and it never changes.
This commit is contained in:
Andreas Kling 2021-06-15 21:05:56 +02:00
parent 8763492e34
commit c6dd3377ee
14 changed files with 194 additions and 122 deletions

View file

@ -46,7 +46,7 @@ public:
void set_bitmap(NonnullRefPtr<Gfx::Bitmap> bitmap) { m_bitmap = move(bitmap); }
void did_modify_bitmap(Image&);
void did_modify_bitmap();
void set_selected(bool selected) { m_selected = selected; }
bool is_selected() const { return m_selected; }
@ -59,6 +59,8 @@ public:
RefPtr<Gfx::Bitmap> try_copy_bitmap(Selection const&) const;
Image const& image() const { return m_image; }
private:
Layer(Image&, NonnullRefPtr<Gfx::Bitmap>, String name);