1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 16:03:21 +08:00

Fix InfoColumn minWidth implementation

This commit is contained in:
recapitalverb 2020-02-11 16:21:31 +07:00
parent 804d210250
commit 17791259ed

View File

@ -118,26 +118,42 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
InternalChild = new FillFlowContainer InternalChild = new GridContainer
{ {
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical, ColumnDimensions = new[]
Spacing = new Vector2(0, 1),
Children = new[]
{ {
text = new OsuSpriteText new Dimension(GridSizeMode.AutoSize, minSize: minWidth ?? 0)
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Absolute, 4),
new Dimension(GridSizeMode.AutoSize)
},
Content = new[]
{
new[]
{ {
Font = OsuFont.GetFont(size: 10, weight: FontWeight.Bold), text = new OsuSpriteText
Text = title.ToUpper() {
Font = OsuFont.GetFont(size: 10, weight: FontWeight.Bold),
Text = title.ToUpper()
}
}, },
separator = new Box new[]
{ {
RelativeSizeAxes = minWidth == null ? Axes.X : Axes.None, separator = new Box
Width = minWidth ?? 1f, {
Height = 2, Anchor = Anchor.CentreLeft,
Margin = new MarginPadding { Top = 2 } RelativeSizeAxes = Axes.X,
Height = 2
}
}, },
content new[]
{
content
}
} }
}; };
} }