1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Simplify GradientLine and fix colour changing

This commit is contained in:
TheWildTree 2020-02-04 17:09:18 +01:00
parent d627d2f74e
commit b28a1d38a6

View File

@ -49,14 +49,7 @@ namespace osu.Game.Graphics.UserInterface
public GradientLine()
{
RelativeSizeAxes = Axes.X;
Size = new Vector2(0.8f, 1.5f);
ColumnDimensions = new[]
{
new Dimension(),
new Dimension(mode: GridSizeMode.Relative, size: 0.4f),
new Dimension(),
};
Size = new Vector2(0.8f, 1f);
Content = new[]
{
@ -65,16 +58,12 @@ namespace osu.Game.Graphics.UserInterface
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourInfo.GradientHorizontal(Color4.Transparent, Color4.White)
Colour = ColourInfo.GradientHorizontal(Color4.Transparent, Colour)
},
new Box
{
RelativeSizeAxes = Axes.Both,
},
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourInfo.GradientHorizontal(Color4.White, Color4.Transparent)
Colour = ColourInfo.GradientHorizontal(Colour, Color4.Transparent)
},
}
};