mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-26 03:02:27 -05:00
PixelPaint: Show mouse position in statusbar without active tool
Showing the position only with an active tool seems a bit confusing, if you've opened up an image just to find out the coordinates of a pixel for instance, there shouldn't be a need to have to select a tool first.
This commit is contained in:
parent
736ab4f83a
commit
405b282bc3
Notes:
sideshowbarker
2024-07-18 04:30:30 +09:00
Author: https://github.com/mustafaquraish Commit: https://github.com/SerenityOS/serenity/commit/405b282bc3e Pull-request: https://github.com/SerenityOS/serenity/pull/9870
1 changed files with 5 additions and 5 deletions
|
@ -213,17 +213,17 @@ void ImageEditor::mousemove_event(GUI::MouseEvent& event)
|
|||
return;
|
||||
}
|
||||
|
||||
auto image_event = event_with_pan_and_scale_applied(event);
|
||||
if (on_image_mouse_position_change) {
|
||||
on_image_mouse_position_change(image_event.position());
|
||||
}
|
||||
|
||||
if (!m_active_tool)
|
||||
return;
|
||||
|
||||
auto layer_event = m_active_layer ? event_adjusted_for_layer(event, *m_active_layer) : event;
|
||||
auto image_event = event_with_pan_and_scale_applied(event);
|
||||
Tool::MouseEvent tool_event(Tool::MouseEvent::Action::MouseDown, layer_event, image_event, event);
|
||||
m_active_tool->on_mousemove(m_active_layer.ptr(), tool_event);
|
||||
|
||||
if (on_image_mouse_position_change) {
|
||||
on_image_mouse_position_change(image_event.position());
|
||||
}
|
||||
}
|
||||
|
||||
void ImageEditor::mouseup_event(GUI::MouseEvent& event)
|
||||
|
|
Loading…
Add table
Reference in a new issue