Skip to content

feat(layout): add min and max size constraints and scale-to-fit - #14

Merged
Deftu merged 6 commits into
Polyfrost:mainfrom
Tellinq:feat/layout-size-constraints
Nov 29, 2026
Merged

Deftu merged 6 commits into
Polyfrost:mainfrom
Tellinq:feat/layout-size-constraints

Conversation

@Tellinq

@Tellinq Tellinq commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Description

Adds widthIn, heightIn and fitContent modifiers so a node can have minimum and maximum sizes, and its children scale down to fit when they overflow. Needed by the HUD size limits in Polyfrost/OneConfig#1312.

Related Issue(s)

How to test

Run ./gradlew :core:test.

Release Notes

added min and max size constraints (`widthIn`, `heightIn`) and `fitContent`

Tellinq and others added 2 commits November 26, 2026 21:20
Adds widthIn, heightIn and fitContent modifiers. minWidth, maxWidth, minHeight and maxHeight clamp a node's size, and fitContent scales a node's children down so content that overflows a clamped size still fits.
@Tellinq
Tellinq force-pushed the feat/layout-size-constraints branch from 5fe233e to a8b40c3 Compare November 27, 2026 02:20
@Deftu
Deftu merged commit c2ff6ce into Polyfrost:main Nov 29, 2026
12 checks passed
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.

3 participants