Skip to content

Commit

Permalink
Use SystemInformation.DragSize.Width for selection tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
oozcitak committed Nov 21, 2019
1 parent 0dbdc1d commit 1ba2b60
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions ImageListView/ImageListViewNavigationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ public partial class ImageListView
/// </summary>
internal class ImageListViewNavigationManager : IDisposable
{
#region Constants
/// <summary>
/// Selection tolerance in pixels.
/// </summary>
private const int SelectionTolerance = 5;
#endregion

#region Member Variables
private ImageListView mImageListView;

Expand Down Expand Up @@ -405,8 +398,8 @@ public void MouseMove(MouseEventArgs e)
else if (!MouseSelecting && !DraggingSeperator && !ResizingPane &&
inItemArea && lastMouseDownInItemArea &&
(LeftButton || RightButton) &&
((Math.Abs(e.Location.X - lastMouseDownLocation.X) > SelectionTolerance ||
Math.Abs(e.Location.Y - lastMouseDownLocation.Y) > SelectionTolerance)))
((Math.Abs(e.Location.X - lastMouseDownLocation.X) > SystemInformation.DragSize.Width ||
Math.Abs(e.Location.Y - lastMouseDownLocation.Y) > SystemInformation.DragSize.Height)))
{
if (mImageListView.MultiSelect && !lastMouseDownOverItem && HoveredItem == null)
{
Expand Down

0 comments on commit 1ba2b60

Please sign in to comment.