1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:47:24 +08:00

Adjust borders/layout to better align with grid

This commit is contained in:
Dean Herbert 2023-07-24 20:20:08 +09:00
parent fd1bd0c88a
commit dd32b771cf

View File

@ -42,9 +42,11 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
const float border_thickness = 4; const float border_thickness = 5;
const float spacing = 2; const float spacing = 2;
Margin = new MarginPadding(10);
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
Flow = new FillFlowContainer<DrawableMatchTeam> Flow = new FillFlowContainer<DrawableMatchTeam>
@ -56,12 +58,10 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
new Container new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding(-(border_thickness + spacing)), Padding = new MarginPadding(-10),
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Children = new[] Child = selectionBox = new Container
{
selectionBox = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Alpha = 0, Alpha = 0,
@ -75,7 +75,14 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
Alpha = 0, Alpha = 0,
} }
}, },
CurrentMatchSelectionBox = new Container },
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding(-(spacing + border_thickness)),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Child = CurrentMatchSelectionBox = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Alpha = 0, Alpha = 0,
@ -90,7 +97,6 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
} }
}, },
} }
},
}; };
boundReference(match.Team1).BindValueChanged(_ => updateTeams()); boundReference(match.Team1).BindValueChanged(_ => updateTeams());
@ -117,7 +123,6 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
Position = new Vector2(pos.NewValue.X, pos.NewValue.Y); Position = new Vector2(pos.NewValue.X, pos.NewValue.Y);
Changed?.Invoke(); Changed?.Invoke();
}, true); }, true);
updateTeams(); updateTeams();
} }