QuickLayout/Sources
Constantine Fry b6039ce36c Add constrainedSize modifier
Summary:
Adds a new constrainedSize(maxWidth:maxHeight:) modifier to QuickLayout that clamps the parent's proposed size before measuring the child.

Unlike .frame(maxWidth:maxHeight:) (FlexibleFrame), this modifier does not create an invisible frame around the child or reposition it with alignment. It simply constrains the proposed size passed to the child and reports the child's actual size as its own. This makes it useful when you want to limit how much space a child is offered without introducing extra layout space around it.

The new ConstrainedSizeElement is modeled after FixedFrameElement but differs in three key ways:

Reports the child's actual size rather than the frame's size
Delegates flexibility to the child instead of reporting .fixedSize
Does not perform alignment positioning — the child is placed at the origin

Reviewed By: xavierjurado

Differential Revision: D94706249

fbshipit-source-id: 26f6a505c64a65964478d2c915962b9bc37c1b6c
2026-03-11 11:53:09 -07:00
..
FastResultBuilder/FastResultBuilder Initial commit 2025-11-14 14:11:10 -08:00
QuickLayout Add constrainedSize modifier 2026-03-11 11:53:09 -07:00