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