Fix issues with desired size system#120640
Open
StarryWorm wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
It appears this also fixes #120099, want someone else to double-check before I mark it as such in PR description |
Make `GridContainer` respect desired sizes Make `BoxContainer` respect desired sizes Make `FlowContainer` respect desired sizes
cecbddb to
02d671b
Compare
YeldhamDev
approved these changes
Jun 25, 2026
YeldhamDev
left a comment
Member
There was a problem hiding this comment.
Looks fine and fixes the issues. But I would still like a second review for this.
KoBeWi
approved these changes
Jun 27, 2026
KoBeWi
left a comment
Member
There was a problem hiding this comment.
Can confirm it fixes the linked issues. The code seems fine overall.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem(s) does this PR solve?
Labelwith autowrapping enabled will not automatically expand its height when its width is decreased #119325BoxContainer,GridContainer, andFlowContainerdon't respect their children's desired sizes withoutSIZE_EXPANDflag #119346Fixes the issue whereby a
Labelusingcustom_maximum_sizeinstead ofcustom_minimum_sizeto define its behavior would not expand vertically when shrunk horizontally whilst in autowrapping modeTest Project (from #119325):
no-clip-label-mrp.zip
Fixes the issue whereby layout
Containertypes, namelyBoxContainer,GridContainer, andFlowContainer, would not allocate size to their children that have a desired size greater than their minimum size.Layout computation flow:
SIZE_EXPANDflag based on their stretch ratios.Step 2 is new, everything else stays unchanged.
In the case of
FlowContainer, this process is actually much simpler, as we can just swap the desired size in for the minimum size, and then trim it back if there isn't enough space to fit it alone on a line/column.Test Projects:
Label(fromBoxContainer,GridContainer, andFlowContainerdon't respect their children's desired sizes withoutSIZE_EXPANDflag #119346): container-desired-sizes-mrp.zipSIZE_EXPANDchild: respect-desired-sizes-mrp.zipAdditional information
Bundled as a single PR since it's all related to the same system. Split commits for now, can squash if preferred.
Discovered this actually didn't need a more thorough rewrite of the sizing system, so getting it out now for maybe 4.7.1 cherrypicking.