mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Merge pull request #4491 from Zaczero/master
Smoothened regionAnimation rectangle animation
This commit is contained in:
commit
c0fd65b9b1
1 changed files with 5 additions and 1 deletions
|
@ -793,7 +793,11 @@ private void Draw(Graphics g)
|
|||
{
|
||||
if (!ShapeManager.PreviousHoverRectangle.IsEmpty && ShapeManager.CurrentHoverShape.Rectangle != ShapeManager.PreviousHoverRectangle)
|
||||
{
|
||||
regionAnimation.FromRectangle = ShapeManager.PreviousHoverRectangle;
|
||||
if (regionAnimation.CurrentRectangle.Width > 2 && regionAnimation.CurrentRectangle.Height > 2)
|
||||
regionAnimation.FromRectangle = regionAnimation.CurrentRectangle;
|
||||
else
|
||||
regionAnimation.FromRectangle = ShapeManager.PreviousHoverRectangle;
|
||||
|
||||
regionAnimation.ToRectangle = ShapeManager.CurrentHoverShape.Rectangle;
|
||||
regionAnimation.Start();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue