mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-01 12:41:24 +12:00
Added hover and grab cursor support to all image editor controls
This commit is contained in:
parent
ca53d6e1a5
commit
8e244b5982
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue