Fix accidental breakage of changelog layout

This commit is contained in:
ansel 2022-10-20 01:24:36 +03:00
parent 72be4940fd
commit 57320074a0
2 changed files with 31 additions and 28 deletions

View File

@ -7,20 +7,29 @@
using osu.Framework.Graphics.Containers;
using osu.Game.Online.API.Requests.Responses;
using System;
using osu.Framework.Graphics.Cursor;
namespace osu.Game.Overlays.Changelog
{
public class ChangelogContent : FillFlowContainer
public class ChangelogContent : PopoverContainer
{
public Action<APIChangelogBuild> BuildSelected;
public void SelectBuild(APIChangelogBuild build) => BuildSelected?.Invoke(build);
protected override Container<Drawable> Content { get; }
public ChangelogContent()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FillDirection.Vertical;
Content = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical
};
base.Content.Add(Content);
}
}
}

View File

@ -10,7 +10,6 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
@ -64,33 +63,28 @@ private void load(CancellationToken? cancellation, IAPIProvider api, OverlayColo
{
CommentsContainer comments;
Child = new PopoverContainer
Children = new Drawable[]
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Children = new Drawable[]
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
new Box
{
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
new Box
{
RelativeSizeAxes = Axes.X,
Height = 2,
Colour = colourProvider.Background6,
Margin = new MarginPadding { Top = 30 },
},
new ChangelogSupporterPromo
{
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
},
new Box
{
RelativeSizeAxes = Axes.X,
Height = 2,
Colour = colourProvider.Background6,
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
},
comments = new CommentsContainer()
}
RelativeSizeAxes = Axes.X,
Height = 2,
Colour = colourProvider.Background6,
Margin = new MarginPadding { Top = 30 },
},
new ChangelogSupporterPromo
{
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
},
new Box
{
RelativeSizeAxes = Axes.X,
Height = 2,
Colour = colourProvider.Background6,
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
},
comments = new CommentsContainer()
};
comments.ShowComments(CommentableType.Build, build.Id);