1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 11:42:54 +08:00

Simplify column dimensions code

`dimensions` would always receive exactly one item, so might as well
inline it.

And yes, at this point the grid container is mostly a glorified
`FillFlowContainer { Direction = FlowDirection.Vertical }`, but I am not
touching that in this pull pending further decisions with respect to
direction.
This commit is contained in:
Bartłomiej Dach 2023-06-03 19:40:01 +02:00
parent 985604fab5
commit 602d5db3bb
No known key found for this signature in database

View File

@ -147,7 +147,6 @@ namespace osu.Game.Screens.Ranking.Statistics
foreach (var item in statisticItems)
{
var columnContent = new List<Drawable>();
var dimensions = new List<Dimension>();
if (!hitEventsAvailable && item.RequiresHitEvents)
{
@ -161,8 +160,6 @@ namespace osu.Game.Screens.Ranking.Statistics
Origin = Anchor.Centre,
});
dimensions.Add(new Dimension());
rows.Add(new GridContainer
{
Anchor = Anchor.TopCentre,
@ -170,7 +167,7 @@ namespace osu.Game.Screens.Ranking.Statistics
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Content = new[] { columnContent.ToArray() },
ColumnDimensions = dimensions.ToArray(),
ColumnDimensions = new[] { new Dimension() },
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }
});
}