Skip to content

Add aspect ratio sizing support to layout - #42

Merged
geom3trik merged 2 commits into
mainfrom
aspect-ratio
Jul 4, 2026
Merged

geom3trik merged 2 commits into
mainfrom
aspect-ratio

Conversation

@geom3trik

Copy link
Copy Markdown
Collaborator

Introduce optional aspect_ratio (width / height) on nodes and wire it through the ECS store/world API. The layout engine now derives auto main/cross sizes from the resolved axis while respecting parent layout orientation, then reapplies min/max constraints so limits can override ratio-derived sizes. Added focused tests for leaf/container behavior, row/column axis conversion, and min/max constraint interactions.

geom3trik added 2 commits July 4, 2026 16:58
Introduce optional `aspect_ratio` (`width / height`) on nodes and wire it through the ECS store/world API. The layout engine now derives auto main/cross sizes from the resolved axis while respecting parent layout orientation, then reapplies min/max constraints so limits can override ratio-derived sizes. Added focused tests for leaf/container behavior, row/column axis conversion, and min/max constraint interactions.
Add a targeted `#[allow(clippy::too_many_arguments)]` on `clamp_with_aspect_ratio` in `layout.rs` to suppress a lint warning for this function signature without changing behavior.
@geom3trik
geom3trik merged commit ff08ec2 into main Jul 4, 2026
4 checks passed
@geom3trik
geom3trik deleted the aspect-ratio branch July 4, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant