mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Don't store snap distance in region capture options
This commit is contained in:
parent
8926d113cc
commit
fa89cd660a
3 changed files with 7 additions and 7 deletions
|
@ -49,9 +49,6 @@ public class RegionCaptureOptions
|
|||
new SnapSize(1280, 720), // 720p
|
||||
new SnapSize(1920, 1080) // 1080p
|
||||
};
|
||||
public int SnapDistance = 30;
|
||||
|
||||
public AnnotationOptions AnnotationOptions = new AnnotationOptions();
|
||||
public bool ShowTips = true;
|
||||
public bool ShowInfo = true;
|
||||
public bool ShowMagnifier = true;
|
||||
|
@ -63,6 +60,7 @@ public class RegionCaptureOptions
|
|||
public Size FixedSize = new Size(250, 250);
|
||||
public bool ShowFPS = false;
|
||||
|
||||
public AnnotationOptions AnnotationOptions = new AnnotationOptions();
|
||||
public ShapeType LastRegionTool = ShapeType.RegionRectangle;
|
||||
public ShapeType LastAnnotationTool = ShapeType.DrawingRectangle;
|
||||
public bool ShowMenuTip = true;
|
||||
|
|
|
@ -32,9 +32,6 @@ namespace ShareX.ScreenCaptureLib
|
|||
{
|
||||
public class ResizeManager
|
||||
{
|
||||
public const int MinMoveSpeed = 1;
|
||||
public const int MaxMoveSpeed = 10;
|
||||
|
||||
private bool visible;
|
||||
|
||||
public bool Visible
|
||||
|
@ -81,6 +78,9 @@ public bool Visible
|
|||
public bool IsResizing { get; private set; }
|
||||
public bool IsBottomRightResizing { get; set; }
|
||||
|
||||
private const int MinMoveSpeed = 1;
|
||||
private const int MaxMoveSpeed = 10;
|
||||
|
||||
private ShapeManager shapeManager;
|
||||
private NodeObject[] nodes;
|
||||
private bool isUpPressed, isDownPressed, isLeftPressed, isRightPressed;
|
||||
|
|
|
@ -197,6 +197,8 @@ public AnnotationOptions AnnotationOptions
|
|||
public event Action<BaseShape> CurrentShapeChanged;
|
||||
public event Action<ShapeType> CurrentShapeTypeChanged;
|
||||
|
||||
private const int SnapDistance = 30;
|
||||
|
||||
private RectangleRegionForm form;
|
||||
private ContextMenuStrip cmsContextMenu;
|
||||
private ToolStripSeparator tssObjectOptions, tssShapeOptions;
|
||||
|
@ -1280,7 +1282,7 @@ private Point SnapPosition(Point posOnClick, Point posCurrent)
|
|||
|
||||
SnapSize snapSize = (from size in Config.SnapSizes
|
||||
let distance = MathHelpers.Distance(vector, new Vector2(size.Width, size.Height))
|
||||
where distance > 0 && distance < Config.SnapDistance
|
||||
where distance > 0 && distance < SnapDistance
|
||||
orderby distance
|
||||
select size).FirstOrDefault();
|
||||
|
||||
|
|
Loading…
Reference in a new issue