diff options
Diffstat (limited to 'Userland/Applications/PixelPaint')
-rw-r--r-- | Userland/Applications/PixelPaint/EllipseTool.cpp | 6 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/RectangleTool.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Userland/Applications/PixelPaint/EllipseTool.cpp b/Userland/Applications/PixelPaint/EllipseTool.cpp index 074835a208..6acb156b35 100644 --- a/Userland/Applications/PixelPaint/EllipseTool.cpp +++ b/Userland/Applications/PixelPaint/EllipseTool.cpp @@ -89,7 +89,11 @@ void EllipseTool::on_mousemove(Layer*, MouseEvent& event) m_draw_mode = event.layer_event().alt() ? DrawMode::FromCenter : DrawMode::FromCorner; - m_ellipse_end_position = event.layer_event().position(); + if (event.layer_event().shift()) + m_ellipse_end_position = m_ellipse_start_position.end_point_for_square_aspect_ratio(event.layer_event().position()); + else + m_ellipse_end_position = event.layer_event().position(); + m_editor->update(); } diff --git a/Userland/Applications/PixelPaint/RectangleTool.cpp b/Userland/Applications/PixelPaint/RectangleTool.cpp index 746c58c9db..a5fdde2923 100644 --- a/Userland/Applications/PixelPaint/RectangleTool.cpp +++ b/Userland/Applications/PixelPaint/RectangleTool.cpp @@ -95,7 +95,11 @@ void RectangleTool::on_mousemove(Layer* layer, MouseEvent& event) m_draw_mode = event.layer_event().alt() ? DrawMode::FromCenter : DrawMode::FromCorner; - m_rectangle_end_position = event.layer_event().position(); + if (event.layer_event().shift()) + m_rectangle_end_position = m_rectangle_start_position.end_point_for_square_aspect_ratio(event.layer_event().position()); + else + m_rectangle_end_position = event.layer_event().position(); + m_editor->update(); } |