From 65c84428cc5132526f97a5e53db6f8f1aba53daf Mon Sep 17 00:00:00 2001 From: David Zhao Date: Thu, 20 Jun 2019 15:05:15 +0900 Subject: [PATCH 1/2] Fix position of gradient in beatmap carousel --- .../Select/Carousel/DrawableCarouselBeatmapSet.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs index 51ca9902d2..ac9aa82f5a 100644 --- a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs +++ b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs @@ -143,10 +143,9 @@ public PanelBackground(WorkingBeatmap working) Origin = Anchor.Centre, FillMode = FillMode.Fill, }, - new FillFlowContainer + new Container { Depth = -1, - Direction = FillDirection.Horizontal, RelativeSizeAxes = Axes.Both, // This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle Shear = new Vector2(0.8f, 0), @@ -157,6 +156,7 @@ public PanelBackground(WorkingBeatmap working) new Box { RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.Both, Colour = Color4.Black, Width = 0.4f, }, @@ -164,20 +164,26 @@ public PanelBackground(WorkingBeatmap working) new Box { RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.Both, Colour = ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.9f)), Width = 0.05f, + X = 0.4f, }, new Box { RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.Both, Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)), Width = 0.2f, + X = 0.45f, }, new Box { RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.Both, Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)), Width = 0.05f, + X = 0.65f, }, } }, From 8ab7a8641b8715ffb91370e644c6aef20c770468 Mon Sep 17 00:00:00 2001 From: Dan Balasescu <1329837+smoogipoo@users.noreply.github.com> Date: Fri, 21 Jun 2019 12:42:35 +0900 Subject: [PATCH 2/2] Add comment for why it's not a fill flow --- osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs index ac9aa82f5a..4ceb82d4cc 100644 --- a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs +++ b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs @@ -143,6 +143,7 @@ public PanelBackground(WorkingBeatmap working) Origin = Anchor.Centre, FillMode = FillMode.Fill, }, + // Todo: This should be a fill flow, but has invalidation issues (see https://github.com/ppy/osu-framework/issues/223) new Container { Depth = -1,