mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:07:34 +00:00
PaintBrush: Switch to the "move" cursor while moving layers around
This commit is contained in:
parent
c2b5519ce2
commit
40ffa8c626
1 changed files with 3 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
||||||
#include "ImageEditor.h"
|
#include "ImageEditor.h"
|
||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
#include "PaintableWidget.h"
|
#include "PaintableWidget.h"
|
||||||
|
#include <LibGUI/Window.h>
|
||||||
#include <LibGfx/Bitmap.h>
|
#include <LibGfx/Bitmap.h>
|
||||||
|
|
||||||
namespace PaintBrush {
|
namespace PaintBrush {
|
||||||
|
@ -49,6 +50,7 @@ void MoveTool::on_mousedown(Layer& layer, GUI::MouseEvent& event, GUI::MouseEven
|
||||||
m_layer_being_moved = layer;
|
m_layer_being_moved = layer;
|
||||||
m_event_origin = original_event.position();
|
m_event_origin = original_event.position();
|
||||||
m_layer_origin = layer.location();
|
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)
|
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)
|
if (event.button() != GUI::MouseButton::Left)
|
||||||
return;
|
return;
|
||||||
m_layer_being_moved = nullptr;
|
m_layer_being_moved = nullptr;
|
||||||
|
m_editor->window()->set_override_cursor(GUI::StandardCursor::None);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue