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
1 changed files with 1 additions and 4 deletions

View File

@ -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) }
});
}