Don't reassign Size in Container if the new size is identical to current size in RecalculateSizes.

This commit is contained in:
2025-06-24 23:44:38 +02:00
parent d44341974f
commit 389a73cf24
2 changed files with 22 additions and 16 deletions

View File

@@ -95,7 +95,12 @@ public abstract class Container : UIElement, IParentableElement
float finalWidth = MathF.Max(occupiedWidth, _minimumSize.Width);
float finalHeight = MathF.Max(occupiedHeight, _minimumSize.Height);
Size = new Rect(finalWidth, finalHeight);
var finalSize = new Rect(finalWidth, finalHeight);
if (finalSize != Size)
{
Size = finalSize;
}
if (_minimumSize > Size)
{