Open
Conversation
Member
ryonakano
reviewed
Oct 13, 2025
| child.measure (HORIZONTAL, -1, null, out child_nat_w, null, null); | ||
| child.measure (VERTICAL, -1, null, out child_nat_h, null, null); | ||
|
|
||
| if (row_used_width + child_nat_w + SPACING * (row.length () - 1) > width) { |
Member
There was a problem hiding this comment.
Sorry if I misunderstand, but why * (row.length () - 1) is necessary here……? I understand row_used_width is consist of (<natural width of child> + SPACING) * <number of child in this row> so I'm not sure why it's necessary.
Also I guess the calculation result of it could be -1 for the first time but is that expected……?
Comment on lines
+100
to
+101
| // If the child doesn't fit in the current row and it's not the first in row -> wrap | ||
| if (row_used > 0 && prospective > width) { |
Member
There was a problem hiding this comment.
What the comment says and what the actual code does are inverted here.
I think we should either
// If the child isn't the first in row it doesn't fit in the current row -> wrap
if (row_used > 0 && prospective > width) {or
// If the child doesn't fit in the current row and it's not the first in row -> wrap
if (prospective > width && row_used > 0) {
Member
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.


Fixes #237