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

Add reverse fill flows & depth specs at usage sites for correct Z-ordering

This commit is contained in:
Bartłomiej Dach 2021-11-29 01:08:45 +01:00
parent e451e43b90
commit af10223ac4
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
4 changed files with 9 additions and 6 deletions

View File

@ -151,7 +151,7 @@ namespace osu.Game.Overlays
} }
// spawn new children with the contained so we only clear old content at the last moment. // spawn new children with the contained so we only clear old content at the last moment.
var content = new FillFlowContainer<BeatmapCard> var content = new ReverseChildIDFillFlowContainer<BeatmapCard>
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
@ -22,7 +23,7 @@ namespace osu.Game.Overlays.Profile
public abstract string Identifier { get; } public abstract string Identifier { get; }
private readonly FillFlowContainer content; private readonly FillFlowContainer<Drawable> content;
private readonly Box background; private readonly Box background;
private readonly Box underscore; private readonly Box underscore;
@ -79,7 +80,7 @@ namespace osu.Game.Overlays.Profile
} }
} }
}, },
content = new FillFlowContainer content = new ReverseChildIDFillFlowContainer<Drawable>
{ {
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -13,6 +13,7 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API; using osu.Game.Online.API;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
using osuTK; using osuTK;
@ -26,7 +27,7 @@ namespace osu.Game.Overlays.Profile.Sections
protected int VisiblePages; protected int VisiblePages;
protected int ItemsPerPage; protected int ItemsPerPage;
protected FillFlowContainer ItemsContainer { get; private set; } protected ReverseChildIDFillFlowContainer<Drawable> ItemsContainer { get; private set; }
private APIRequest<List<TModel>> retrievalRequest; private APIRequest<List<TModel>> retrievalRequest;
private CancellationTokenSource loadCancellation; private CancellationTokenSource loadCancellation;
@ -48,11 +49,12 @@ namespace osu.Game.Overlays.Profile.Sections
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Children = new Drawable[] Children = new Drawable[]
{ {
ItemsContainer = new FillFlowContainer ItemsContainer = new ReverseChildIDFillFlowContainer<Drawable>
{ {
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Spacing = new Vector2(0, 2), Spacing = new Vector2(0, 2),
Depth = float.MinValue
}, },
moreButton = new ShowMoreButton moreButton = new ShowMoreButton
{ {

View File

@ -135,7 +135,7 @@ namespace osu.Game.Overlays.Rankings
Children = new Drawable[] Children = new Drawable[]
{ {
new ScoresTable(1, response.Users), new ScoresTable(1, response.Users),
new FillFlowContainer new ReverseChildIDFillFlowContainer<BeatmapCard>
{ {
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,