mirror of https://github.com/ppy/osu
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:
parent
985604fab5
commit
602d5db3bb
|
@ -147,7 +147,6 @@ private void populateStatistics(ValueChangedEvent<ScoreInfo> score)
|
|||
foreach (var item in statisticItems)
|
||||
{
|
||||
var columnContent = new List<Drawable>();
|
||||
var dimensions = new List<Dimension>();
|
||||
|
||||
if (!hitEventsAvailable && item.RequiresHitEvents)
|
||||
{
|
||||
|
@ -161,8 +160,6 @@ private void populateStatistics(ValueChangedEvent<ScoreInfo> score)
|
|||
Origin = Anchor.Centre,
|
||||
});
|
||||
|
||||
dimensions.Add(new Dimension());
|
||||
|
||||
rows.Add(new GridContainer
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
|
@ -170,7 +167,7 @@ private void populateStatistics(ValueChangedEvent<ScoreInfo> score)
|
|||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Content = new[] { columnContent.ToArray() },
|
||||
ColumnDimensions = dimensions.ToArray(),
|
||||
ColumnDimensions = new[] { new Dimension() },
|
||||
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue