add gradient and fix remaining error

This commit is contained in:
jorolf 2019-04-04 00:57:15 +02:00
parent ccc804a9b2
commit ba87136451
2 changed files with 20 additions and 8 deletions

View File

@ -20,7 +20,9 @@ namespace osu.Game.Tests.Visual.Online
public class TestCaseUserProfile : OsuTestCase
{
private readonly TestUserProfileOverlay profile;
private IAPIProvider api;
[Resolved]
private IAPIProvider api { get; set; }
public override IReadOnlyList<Type> RequiredTypes => new[]
{
@ -75,12 +77,6 @@ namespace osu.Game.Tests.Visual.Online
Add(profile = new TestUserProfileOverlay());
}
[BackgroundDependencyLoader]
private void load(APIAccess api)
{
this.api = api;
}
protected override void LoadComplete()
{
base.LoadComplete();

View File

@ -9,6 +9,9 @@ using osu.Game.Graphics;
using osu.Game.Overlays.Profile.Header;
using osu.Game.Users;
using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
@ -35,10 +38,23 @@ namespace osu.Game.Overlays.Profile
Children = new Drawable[]
{
coverContainer = new UserCoverBackground
new Container
{
RelativeSizeAxes = Axes.X,
Height = cover_height,
Masking = true,
Children = new Drawable[]
{
coverContainer = new UserCoverBackground
{
RelativeSizeAxes = Axes.Both,
},
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourInfo.GradientVertical(OsuColour.FromHex("222").Opacity(0.8f), OsuColour.FromHex("222").Opacity(0.2f))
},
}
},
new Container
{