mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
switch to dragging cursor on left mouse button down.
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user