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

PixelPaint: Move LayerListWidget gadget rect computation to a function

This will allow functions other than paint_event() to use the various
gadget rects (thumbnail, text, etc.)
This commit is contained in:
Andreas Kling 2021-07-09 21:27:21 +02:00
parent 1cec672e69
commit 285f0383d4
2 changed files with 21 additions and 13 deletions

View file

@ -56,6 +56,7 @@ private:
Gfx::IntPoint movement_delta;
};
void get_gadget_rects(Gadget const&, Gfx::IntRect& outer_rect, Gfx::IntRect& thumbnail_rect, Gfx::IntRect& text_rect);
bool is_moving_gadget() const { return m_moving_gadget_index.has_value(); }
Optional<size_t> gadget_at(Gfx::IntPoint const&);