From d74b7fb304df94f3a4aa31730d26babc2e2a4d50 Mon Sep 17 00:00:00 2001 From: Nils Hausfeld Date: Tue, 18 Jun 2024 18:40:28 +0200 Subject: [PATCH] - Set description panel min height to reduce window jittering (workaround) --- Source/Editor/Surface/ContextMenu/VisjectCM.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Surface/ContextMenu/VisjectCM.cs b/Source/Editor/Surface/ContextMenu/VisjectCM.cs index 8f90e80cd..23ff43364 100644 --- a/Source/Editor/Surface/ContextMenu/VisjectCM.cs +++ b/Source/Editor/Surface/ContextMenu/VisjectCM.cs @@ -897,8 +897,11 @@ namespace FlaxEditor.Surface.ContextMenu _descriptionOutputPanel.Y = panelHeight; panelHeight += Mathf.Max(_descriptionInputPanel.Height, _descriptionOutputPanel.Height); - _descriptionPanel.Height = panelHeight; - Height = 400 + Mathf.RoundToInt(_descriptionPanel.Height); + + // Forcing the description panel to at least have a height of 120 to not make the window size change too much in order to reduce jittering + // TODO: Remove the Mathf.Max and just set the height to panelHeight once the window jitter issue is fixed - Nils + _descriptionPanel.Height = Mathf.Max(120f, panelHeight); + Height = 400 + _descriptionPanel.Height; UpdateWindowSize(); Profiler.EndEvent();