mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 00:53:10 +08:00
Make popup body text left aligned when multiple lines of text are provided
This commit is contained in:
parent
1d81dade25
commit
60fd0be481
@ -75,7 +75,9 @@ namespace osu.Game.Overlays.Dialog
|
||||
return;
|
||||
|
||||
bodyText = value;
|
||||
|
||||
body.Text = value;
|
||||
body.TextAnchor = bodyText.ToString().Contains('\n') ? Anchor.TopLeft : Anchor.TopCentre;
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,13 +212,12 @@ namespace osu.Game.Overlays.Dialog
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
TextAnchor = Anchor.TopCentre,
|
||||
Padding = new MarginPadding { Horizontal = 15 },
|
||||
Padding = new MarginPadding { Horizontal = 15, Bottom = 10 },
|
||||
},
|
||||
body = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 18))
|
||||
{
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
TextAnchor = Anchor.TopCentre,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Padding = new MarginPadding { Horizontal = 15 },
|
||||
|
Loading…
Reference in New Issue
Block a user