From 37a1a4311c1b3cd372a912abfec374411ad18461 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 4 Jun 2016 00:43:13 +0400 Subject: [PATCH] switch to dragging cursor on left mouse button down. --- GUI/DragScroll.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GUI/DragScroll.cs b/GUI/DragScroll.cs index ce13fefe..2a5e6db0 100644 --- a/GUI/DragScroll.cs +++ b/GUI/DragScroll.cs @@ -105,6 +105,10 @@ namespace GARbro.GUI VerticalOffset = scroller.VerticalOffset, 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) @@ -156,9 +160,6 @@ namespace GARbro.GUI if (System.Math.Abs(dy) > 5 || System.Math.Abs(dx) > 5) { target.CaptureMouse(); - var cursor = target.GetValue (DraggingCursorProperty) as Cursor; - if (cursor != null) - Mouse.OverrideCursor = cursor; } scroller.ScrollToHorizontalOffset(capture.HorizontalOffset - dx); scroller.ScrollToVerticalOffset(capture.VerticalOffset - dy);