Fix text flow wrapping incorrectly in multiplayer usages

This commit is contained in:
Bartłomiej Dach
2021-11-03 18:08:12 +01:00
parent 6e33fa088f
commit 098fa181b4
2 changed files with 8 additions and 3 deletions

View File

@ -181,8 +181,11 @@ namespace osu.Game.Screens.OnlinePlay
{ {
beatmapText = new LinkFlowContainer(fontParameters) beatmapText = new LinkFlowContainer(fontParameters)
{ {
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
// workaround to ensure only the first line of text shows, emulating truncation (but without ellipsis at the end).
// TODO: remove when text/link flow can support truncation with ellipsis natively.
Height = OsuFont.DEFAULT_FONT_SIZE,
Masking = true
}, },
new FillFlowContainer new FillFlowContainer
{ {

View File

@ -353,7 +353,10 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
}) })
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y // workaround to ensure only the first line of text shows, emulating truncation (but without ellipsis at the end).
// TODO: remove when text/link flow can support truncation with ellipsis natively.
Height = 16,
Masking = true
} }
} }
} }
@ -385,7 +388,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
creationParameters: s => creationParameters: s =>
{ {
s.Truncate = true; s.Truncate = true;
s.RelativeSizeAxes = Axes.X;
}); });
} }
} }