Right-align avatar

This commit is contained in:
Dan Balasescu 2021-11-26 17:17:06 +09:00
parent 8541db1e85
commit 8be2defd09

View File

@ -194,30 +194,21 @@ namespace osu.Game.Screens.OnlinePlay
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColumnDimensions = new[] ColumnDimensions = new[]
{ {
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize),
new Dimension(), new Dimension(),
new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize)
}, },
Content = new[] Content = new[]
{ {
new Drawable[] new Drawable[]
{ {
ownerAvatar = new OwnerAvatar
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(ICON_HEIGHT),
Margin = new MarginPadding { Left = 8, Right = 8, },
Masking = true,
CornerRadius = 4,
},
difficultyIconContainer = new Container difficultyIconContainer = new Container
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Right = 8 }, Margin = new MarginPadding { Left = 8, Right = 8 },
}, },
new FillFlowContainer new FillFlowContainer
{ {
@ -280,7 +271,7 @@ namespace osu.Game.Screens.OnlinePlay
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
Direction = FillDirection.Horizontal, Direction = FillDirection.Horizontal,
Margin = new MarginPadding { Left = 8, Right = 10, }, Margin = new MarginPadding { Left = 8 },
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Spacing = new Vector2(5), Spacing = new Vector2(5),
ChildrenEnumerable = CreateButtons().Select(button => button.With(b => ChildrenEnumerable = CreateButtons().Select(button => button.With(b =>
@ -288,7 +279,16 @@ namespace osu.Game.Screens.OnlinePlay
b.Anchor = Anchor.Centre; b.Anchor = Anchor.Centre;
b.Origin = Anchor.Centre; b.Origin = Anchor.Centre;
})) }))
} },
ownerAvatar = new OwnerAvatar
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(ICON_HEIGHT),
Margin = new MarginPadding { Left = 8, Right = 8, },
Masking = true,
CornerRadius = 4,
},
} }
} }
}, },