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

PixelPaint: Show resize anchors when using the move tool

This commit adds a two color border around areas that the user must
drag to resize, when using the move tool.
This commit is contained in:
Tim Ledbetter 2023-01-27 22:08:20 +00:00 committed by Andreas Kling
parent 4c617d370e
commit c82825379a
2 changed files with 27 additions and 6 deletions

View file

@ -41,6 +41,8 @@ public:
LayerSelectionMode layer_selection_mode() const { return m_layer_selection_mode; }
private:
static Gfx::IntRect resize_anchor_rect_from_position(Gfx::IntPoint);
static Array<Gfx::IntRect, 4> resize_anchor_rects(Gfx::IntRect layer_rect_in_frame_coordinates);
virtual StringView tool_name() const override { return "Move Tool"sv; }
ErrorOr<void> update_cached_preview_bitmap(Layer const* layer);
Optional<ResizeAnchorLocation const> resize_anchor_location_from_cursor_position(Layer const*, MouseEvent&);