mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
PixelPaint: Let Tools have different cursors
This adds support for the Tools in PixelPaint to use different cursors within ImageEditor. For now most of them get the crosshair cursor since it's the most fitting, but in the future we will want to add custom cursors.
This commit is contained in:
parent
657fbc1e6c
commit
b1b6a6d6e8
14 changed files with 28 additions and 3 deletions
|
@ -32,7 +32,6 @@ void MoveTool::on_mousedown(Layer& layer, GUI::MouseEvent& event, GUI::MouseEven
|
|||
m_layer_being_moved = layer;
|
||||
m_event_origin = image_event.position();
|
||||
m_layer_origin = layer.location();
|
||||
m_editor->window()->set_cursor(Gfx::StandardCursor::Move);
|
||||
}
|
||||
|
||||
void MoveTool::on_mousemove(Layer&, GUI::MouseEvent&, GUI::MouseEvent& image_event)
|
||||
|
@ -49,7 +48,6 @@ void MoveTool::on_mouseup(Layer&, GUI::MouseEvent& event, GUI::MouseEvent&)
|
|||
if (event.button() != GUI::MouseButton::Left)
|
||||
return;
|
||||
m_layer_being_moved = nullptr;
|
||||
m_editor->window()->set_cursor(Gfx::StandardCursor::None);
|
||||
m_editor->did_complete_action();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue