1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

Remove more GridContainer nonsense

This commit is contained in:
Dean Herbert 2023-06-28 18:17:57 +09:00
parent 8c4831e09f
commit 98bf15182e
2 changed files with 15 additions and 38 deletions

View File

@ -26,31 +26,20 @@ namespace osu.Game.Screens.Ranking.Statistics
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
InternalChild = new GridContainer
InternalChild = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Content = new[]
Children = new[]
{
new[]
createHeader(item),
new Container
{
createHeader(item)
},
new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Margin = new MarginPadding { Top = 15 },
Child = item.CreateContent()
}
},
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Margin = new MarginPadding { Top = 15 },
Child = item.CreateContent()
}
}
};
}

View File

@ -124,7 +124,7 @@ namespace osu.Game.Screens.Ranking.Statistics
}
else
{
FillFlowContainer rows;
FillFlowContainer flow;
container = new OsuScrollContainer(Direction.Vertical)
{
RelativeSizeAxes = Axes.Both,
@ -133,11 +133,12 @@ namespace osu.Game.Screens.Ranking.Statistics
Alpha = 0,
Children = new[]
{
rows = new FillFlowContainer
flow = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(30, 15)
Spacing = new Vector2(30, 15),
Direction = FillDirection.Full,
}
}
};
@ -146,35 +147,22 @@ namespace osu.Game.Screens.Ranking.Statistics
foreach (var item in statisticItems)
{
var columnContent = new List<Drawable>();
if (!hitEventsAvailable && item.RequiresHitEvents)
{
anyRequiredHitEvents = true;
continue;
}
columnContent.Add(new StatisticContainer(item)
flow.Add(new StatisticContainer(item)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
});
rows.Add(new GridContainer
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Content = new[] { columnContent.ToArray() },
ColumnDimensions = new[] { new Dimension() },
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }
});
}
if (anyRequiredHitEvents)
{
rows.Add(new FillFlowContainer
flow.Add(new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,