mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Merge pull request #2986 from L1Q/master
Limit panning based on 25% of client area instead of 100px
This commit is contained in:
commit
4d310a4074
1 changed files with 2 additions and 4 deletions
|
@ -364,11 +364,9 @@ private void Pan(int deltaX, int deltaY, bool usePanningStretch = true)
|
|||
PanningStrech.Y -= deltaY;
|
||||
}
|
||||
|
||||
int panLimit = 100;
|
||||
|
||||
Size panLimitSize = new Size(
|
||||
Math.Min(panLimit, CanvasRectangle.Width),
|
||||
Math.Min(panLimit, CanvasRectangle.Height));
|
||||
Math.Min((int)Math.Round(ClientArea.Width * 0.25f), CanvasRectangle.Width),
|
||||
Math.Min((int)Math.Round(ClientArea.Height * 0.25f), CanvasRectangle.Height));
|
||||
|
||||
Rectangle limitRectangle = new Rectangle(
|
||||
ClientArea.X + panLimitSize.Width, ClientArea.Y + panLimitSize.Height,
|
||||
|
|
Loading…
Reference in a new issue