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

PixelPaint: Show image coordinates in the status bar

This commit is contained in:
Clément Sibille 2021-08-01 11:59:47 +02:00 committed by Andreas Kling
parent 611370e7dc
commit fb099ad38b
3 changed files with 30 additions and 0 deletions

View file

@ -207,6 +207,10 @@ void ImageEditor::mousemove_event(GUI::MouseEvent& event)
auto image_event = event_with_pan_and_scale_applied(event);
m_active_tool->on_mousemove(*m_active_layer, layer_event, image_event);
if (on_image_mouse_position_change) {
on_image_mouse_position_change(image_event.position());
}
}
void ImageEditor::mouseup_event(GUI::MouseEvent& event)
@ -249,6 +253,12 @@ void ImageEditor::keyup_event(GUI::KeyEvent& event)
m_active_tool->on_keyup(event);
}
void ImageEditor::leave_event(Core::Event&)
{
if (on_leave)
on_leave();
}
void ImageEditor::set_active_layer(Layer* layer)
{
if (m_active_layer == layer)