switch to dragging cursor on left mouse button down.

This commit is contained in:
morkt
2016-06-04 00:43:13 +04:00
parent aeccf3a545
commit 37a1a4311c

View File

@@ -105,6 +105,10 @@ namespace GARbro.GUI
VerticalOffset = scroller.VerticalOffset, VerticalOffset = scroller.VerticalOffset,
Point = e.GetPosition(scroller), Point = e.GetPosition(scroller),
}; };
var cursor = target.GetValue (DraggingCursorProperty) as Cursor;
if (cursor != null)
Mouse.OverrideCursor = cursor;
} }
static void target_Loaded(object sender, RoutedEventArgs e) static void target_Loaded(object sender, RoutedEventArgs e)
@@ -156,9 +160,6 @@ namespace GARbro.GUI
if (System.Math.Abs(dy) > 5 || System.Math.Abs(dx) > 5) if (System.Math.Abs(dy) > 5 || System.Math.Abs(dx) > 5)
{ {
target.CaptureMouse(); target.CaptureMouse();
var cursor = target.GetValue (DraggingCursorProperty) as Cursor;
if (cursor != null)
Mouse.OverrideCursor = cursor;
} }
scroller.ScrollToHorizontalOffset(capture.HorizontalOffset - dx); scroller.ScrollToHorizontalOffset(capture.HorizontalOffset - dx);
scroller.ScrollToVerticalOffset(capture.VerticalOffset - dy); scroller.ScrollToVerticalOffset(capture.VerticalOffset - dy);