Fix incorrect text flow layout with non-left anchors when line breaks at last word of paragraph

Closes https://github.com/ppy/osu/issues/32861.
This commit is contained in:
Bartłomiej Dach
2025-04-18 20:26:21 +02:00
parent f974593670
commit 6f194c91c4

View File

@@ -567,7 +567,8 @@ namespace osu.Framework.Graphics.Containers
layoutPositions[i] = current;
rowWidths.Add(0);
// DIFFERENCE: `FillFlowContainer` does 0 here, because it's tracking offsets *to middle*, not total row widths.
rowWidths.Add(current.X + size.X);
// DIFFERENCE: `IHasLineBaseHeight` tracking.
lineBaseHeights.Add((c as IHasLineBaseHeight)?.LineBaseHeight ?? 0);