Added hover and grab cursor support to all image editor controls

This commit is contained in:
Jaex 2020-04-02 17:32:28 +03:00
parent ca53d6e1a5
commit 8e244b5982

View file

@ -358,6 +358,24 @@ public ShapeManager(RegionCaptureForm form)
{
scrollbarManager = new ScrollbarManager(form, this);
}
foreach (ImageEditorControl control in DrawableObjects)
{
control.MouseDown += (sender, e) => Form.SetHandCursor(true);
control.MouseUp += (sender, e) =>
{
if (control.IsCursorHover)
{
Form.SetHandCursor(false);
}
else
{
Form.SetDefaultCursor();
}
};
control.MouseEnter += () => Form.SetHandCursor(false);
control.MouseLeave += () => Form.SetDefaultCursor();
}
}
private void form_Shown(object sender, EventArgs e)