1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +08:00

Fix position of gradient in beatmap carousel when scaling UI (#5093)

Fix position of gradient in beatmap carousel when scaling UI

Co-authored-by: Dan Balasescu <1329837+smoogipoo@users.noreply.github.com>
This commit is contained in:
Dean Herbert 2019-06-21 12:59:38 +09:00 committed by GitHub
commit d0fb08d918
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,10 +143,10 @@ namespace osu.Game.Screens.Select.Carousel
Origin = Anchor.Centre, Origin = Anchor.Centre,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,
}, },
new FillFlowContainer // Todo: This should be a fill flow, but has invalidation issues (see https://github.com/ppy/osu-framework/issues/223)
new Container
{ {
Depth = -1, Depth = -1,
Direction = FillDirection.Horizontal,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
// This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle // This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle
Shear = new Vector2(0.8f, 0), Shear = new Vector2(0.8f, 0),
@ -157,6 +157,7 @@ namespace osu.Game.Screens.Select.Carousel
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.Both,
Colour = Color4.Black, Colour = Color4.Black,
Width = 0.4f, Width = 0.4f,
}, },
@ -164,20 +165,26 @@ namespace osu.Game.Screens.Select.Carousel
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.Both,
Colour = ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.9f)), Colour = ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.9f)),
Width = 0.05f, Width = 0.05f,
X = 0.4f,
}, },
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.Both,
Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)), Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)),
Width = 0.2f, Width = 0.2f,
X = 0.45f,
}, },
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.Both,
Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)), Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)),
Width = 0.05f, Width = 0.05f,
X = 0.65f,
}, },
} }
}, },