mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
PixelPaint: Scale move tool resize anchors
The areas where the user must click to resize the image are now scaled to ensure they do not overlap. This allows us to display the correct cursor when zoomed out, as well as making the borders look nicer.
This commit is contained in:
parent
c82825379a
commit
9115e99e4b
2 changed files with 34 additions and 15 deletions
|
@ -41,8 +41,9 @@ 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);
|
||||
static int resize_anchor_size(Gfx::IntRect layer_rect_in_frame_coordinates);
|
||||
static Gfx::IntRect resize_anchor_rect_from_position(Gfx::IntPoint, int resize_anchor_size);
|
||||
static Array<Gfx::IntRect, 4> resize_anchor_rects(Gfx::IntRect layer_rect_in_frame_coordinates, int resize_anchor_size);
|
||||
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&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue