mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 20:07:25 +08:00
Reduce container nesting by one level
This commit is contained in:
parent
8e0235392f
commit
bc88c4ee8e
@ -46,10 +46,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Shear = new Vector2(ShearedOverlayContainer.SHEAR, 0);
|
||||
Masking = true;
|
||||
CornerRadius = corner_radius;
|
||||
InternalChild = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
background = new Box
|
||||
{
|
||||
@ -76,13 +74,13 @@ namespace osu.Game.Graphics.UserInterface
|
||||
},
|
||||
textBox = new InnerSearchTextBox
|
||||
{
|
||||
Shear = -new Vector2(ShearedOverlayContainer.SHEAR, 0),
|
||||
Shear = -Shear,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
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,
|
||||
Anchor = Anchor.Centre,
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user