mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
PaintBrush: Switch to the "move" cursor while moving layers around
This commit is contained in:
parent
c2b5519ce2
commit
40ffa8c626
Notes:
sideshowbarker
2024-07-19 06:41:36 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/40ffa8c626d
1 changed files with 3 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "ImageEditor.h"
|
||||
#include "Layer.h"
|
||||
#include "PaintableWidget.h"
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
|
||||
namespace PaintBrush {
|
||||
|
@ -49,6 +50,7 @@ void MoveTool::on_mousedown(Layer& layer, GUI::MouseEvent& event, GUI::MouseEven
|
|||
m_layer_being_moved = layer;
|
||||
m_event_origin = original_event.position();
|
||||
m_layer_origin = layer.location();
|
||||
m_editor->window()->set_override_cursor(GUI::StandardCursor::Move);
|
||||
}
|
||||
|
||||
void MoveTool::on_mousemove(Layer&, GUI::MouseEvent&, GUI::MouseEvent& original_event)
|
||||
|
@ -65,6 +67,7 @@ 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_override_cursor(GUI::StandardCursor::None);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue