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

@@ -127,22 +127,23 @@ public class TestGame : Game
private ResourceRef<Sound> _sound;
private ResourceRef<Texture2d> _icon;
// private FlexContainer _container = new(minimumSize: new Rect(64.0f, 64.0f), new())
// {
// Anchor = Anchor.Center,
// Size = new Rect(500, 300),
// Direction = FlexDirection.Column,
// Justify = JustifyContent.Start,
// Align = AlignItems.Center,
// Wrap = true,
// Gap = 10f
// };
private Frame _frame = new();
private VerticalContainer _container = new(new Rect(128.0f, 64.0f), new(), 16)
private FlexContainer _container = new(minimumSize: new Rect(64.0f, 64.0f), new())
{
ConfineToContents = true,
Anchor = Anchor.CenterLeft,
AnchorOffset = new Vector2(0.5f, 0.0f)
Anchor = Anchor.Center,
Size = new Rect(500, 300),
Direction = FlexDirection.Column,
Justify = JustifyContent.Start,
Align = AlignItems.Center,
Wrap = true,
Gap = 10f
};
private Frame _frame = new();
// private HorizontalContainer _container = new(new Rect(128.0f, 64.0f), new(), 16)
// {
// ConfineToContents = true,
// Anchor = Anchor.CenterRight,
// AnchorOffset = new Vector2(0.5f, 0.0f)
// };
}