Commit 9df0e91
committed
Only consider flowing children when performing layout of text flow
Fixes one part of ppy/osu#32348.
The reason this is required is due to the game-side abuse done by
`DrawableLinkCompiler` & co. See the following:
https://github.com/ppy/osu/blob/4633f635a4137d6af902187e12d6fc360bc3a50d/osu.Game/Graphics/Containers/LinkFlowContainer.cs#L141-L144
`FillFlowContainer` performs layout computations on `FlowingChildren`
specifically:
https://github.com/ppy/osu-framework/blob/1ccf0376c4306cb4077d0e3230f60efb92ea7803/osu.Framework/Graphics/Containers/FillFlowContainer.cs#L113
Because of this, if using `Flow.Children` in `TextFlowContainer`, the
`DrawableLinkCompiler` - which was skipped by the inner fill flow - is
now being considered for layout at the text flow level. Text flow sees
that the X position of the compiler is 0 (because it wasn't touched by
the inner fill flow), and thus thinks it must be a line break, which
it's not.
So we use `FlowingChildren` to restore parity.1 parent 1ccf037 commit 9df0e91
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| |||
0 commit comments