From 99a563dad60e8806dba209420ae23b8f33176d47 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 22 Oct 2020 02:01:53 +0100 Subject: [PATCH] Changed: attempted to reduce flickering --- Windows/Forms/Tile/TTilePanel.cs | 1 + Windows/Forms/Tile/TTilePanelLayout.cs | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Windows/Forms/Tile/TTilePanel.cs b/Windows/Forms/Tile/TTilePanel.cs index 48d2d8c..00e144c 100644 --- a/Windows/Forms/Tile/TTilePanel.cs +++ b/Windows/Forms/Tile/TTilePanel.cs @@ -23,6 +23,7 @@ namespace AppLauncher.Windows.Forms this.BackColor = Color.FromArgb(250, 250, 250); this.ContextMenuStrip = contextMenuStrip1; + this.DoubleBuffered = true; label1.ForeColor = Color.FromArgb(99, 105, 119); label1.Font = new Font(this.Font.FontFamily, 8.25F); diff --git a/Windows/Forms/Tile/TTilePanelLayout.cs b/Windows/Forms/Tile/TTilePanelLayout.cs index 64b5b1f..bf72530 100644 --- a/Windows/Forms/Tile/TTilePanelLayout.cs +++ b/Windows/Forms/Tile/TTilePanelLayout.cs @@ -335,7 +335,7 @@ namespace AppLauncher.Windows.Forms isAnimating = false; - this.Invalidate(); + this.Invalidate(this.DisplayRectangle, false); }); } @@ -353,8 +353,6 @@ namespace AppLauncher.Windows.Forms while (this.Height < this.ExpandedHeight) { ThreadControl.SetHeight(this, (this.Height + expandIncrement)); - this.Invalidate(); - Thread.Sleep(10); } } @@ -363,7 +361,7 @@ namespace AppLauncher.Windows.Forms isAnimating = false; - this.Invalidate(); + this.Invalidate(this.DisplayRectangle, false); }); }