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

Revisit UserGridPanel layout

This commit is contained in:
Andrei Zavatski 2020-03-05 02:31:19 +03:00
parent 2e996eeb7e
commit 13752ffe9d

View File

@ -45,6 +45,7 @@ namespace osu.Game.Users
RowDimensions = new[] RowDimensions = new[]
{ {
new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Absolute, margin),
new Dimension() new Dimension()
}, },
Content = new[] Content = new[]
@ -54,32 +55,57 @@ namespace osu.Game.Users
CreateAvatar().With(avatar => CreateAvatar().With(avatar =>
{ {
avatar.Size = new Vector2(60); avatar.Size = new Vector2(60);
avatar.Margin = new MarginPadding { Bottom = margin };
avatar.Masking = true; avatar.Masking = true;
avatar.CornerRadius = 6; avatar.CornerRadius = 6;
}), }),
new FillFlowContainer new Container
{ {
AutoSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Vertical, Padding = new MarginPadding { Left = margin },
Spacing = new Vector2(0, 7), Child = new GridContainer
Margin = new MarginPadding { Left = margin },
Children = new Drawable[]
{ {
details = new FillFlowContainer RelativeSizeAxes = Axes.Both,
ColumnDimensions = new[]
{ {
AutoSizeAxes = Axes.Both, new Dimension()
Direction = FillDirection.Horizontal,
Spacing = new Vector2(6),
Children = new Drawable[]
{
CreateFlag(),
}
}, },
CreateUsername(), RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension()
},
Content = new[]
{
new Drawable[]
{
details = new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(6),
Children = new Drawable[]
{
CreateFlag(),
}
}
},
new Drawable[]
{
CreateUsername().With(username =>
{
username.Anchor = Anchor.CentreLeft;
username.Origin = Anchor.CentreLeft;
})
}
}
} }
} }
}, },
new[]
{
Empty(),
Empty()
},
new Drawable[] new Drawable[]
{ {
CreateStatusIcon().With(icon => CreateStatusIcon().With(icon =>