From d71c2c62e5a58a11a479a2a4fc5f56eb3c30a688 Mon Sep 17 00:00:00 2001 From: Jaex Date: Sun, 2 Oct 2016 21:58:37 +0300 Subject: [PATCH] Make sure tooltips close when button become disabled --- ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs b/ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs index 8cd02c820..8002c1577 100644 --- a/ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs +++ b/ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs @@ -34,7 +34,7 @@ namespace ShareX.ScreenCaptureLib { internal partial class ShapeManager { - internal TextAnimation MenuTextAnimation = new TextAnimation(TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(0.5)); + internal TextAnimation MenuTextAnimation = new TextAnimation(TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(0.5)); private Form menuForm; private ToolStripEx tsMain; @@ -634,6 +634,8 @@ private void CreateMenu() menuForm.Location = rectActiveScreen.Location; } + tsMain.MouseLeave += (sender, e) => MenuTextAnimation.Stop(); + foreach (ToolStripItem tsi in tsMain.Items.OfType()) { if (!string.IsNullOrEmpty(tsi.Text))