Reduce container nesting by one level

This commit is contained in:
Dean Herbert
2022-05-03 14:34:18 +09:00
parent 8e0235392f
commit bc88c4ee8e

View File

@ -46,10 +46,8 @@ namespace osu.Game.Graphics.UserInterface
Shear = new Vector2(ShearedOverlayContainer.SHEAR, 0); Shear = new Vector2(ShearedOverlayContainer.SHEAR, 0);
Masking = true; Masking = true;
CornerRadius = corner_radius; CornerRadius = corner_radius;
InternalChild = new Container
{ InternalChildren = new Drawable[]
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{ {
background = new Box background = new Box
{ {
@ -76,13 +74,13 @@ namespace osu.Game.Graphics.UserInterface
}, },
textBox = new InnerSearchTextBox textBox = new InnerSearchTextBox
{ {
Shear = -new Vector2(ShearedOverlayContainer.SHEAR, 0), Shear = -Shear,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Padding = new MarginPadding Padding = new MarginPadding
{ {
Horizontal = corner_radius + new Vector2(ShearedOverlayContainer.SHEAR, 0).X Horizontal = corner_radius + Shear.X
} }
} }
} }
@ -102,7 +100,7 @@ namespace osu.Game.Graphics.UserInterface
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Size = new Vector2(16), Size = new Vector2(16),
Shear = -new Vector2(ShearedOverlayContainer.SHEAR, 0) Shear = -Shear
} }
} }
} }
@ -114,7 +112,6 @@ namespace osu.Game.Graphics.UserInterface
new Dimension(GridSizeMode.AutoSize) new Dimension(GridSizeMode.AutoSize)
} }
} }
}
}; };
} }