Fix wrong date colour of kudosu history items

This commit is contained in:
Bartłomiej Dach 2022-12-31 21:10:48 +01:00
parent bfca75395b
commit 67a3ea2c59
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions

View File

@ -5,12 +5,12 @@
using System.Collections.Generic;
using System;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual.Online
{
@ -18,6 +18,9 @@ public partial class TestSceneKudosuHistory : OsuTestScene
{
private readonly Box background;
[Cached]
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink);
public TestSceneKudosuHistory()
{
FillFlowContainer<DrawableKudosuHistoryItem> content;
@ -42,9 +45,9 @@ public TestSceneKudosuHistory()
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
private void load()
{
background.Colour = colours.GreySeaFoam;
background.Colour = colourProvider.Background4;
}
private readonly IEnumerable<APIKudosuHistory> items = new[]

View File

@ -17,9 +17,6 @@ public partial class DrawableKudosuHistoryItem : CompositeDrawable
{
private const int height = 25;
[Resolved]
private OsuColour colours { get; set; } = null!;
private readonly APIKudosuHistory historyItem;
private readonly LinkFlowContainer linkFlowContainer;
private readonly DrawableDate date;
@ -48,9 +45,9 @@ public DrawableKudosuHistoryItem(APIKudosuHistory historyItem)
}
[BackgroundDependencyLoader]
private void load()
private void load(OverlayColourProvider colourProvider)
{
date.Colour = colours.GreySeaFoamLighter;
date.Colour = colourProvider.Foreground1;
var formattedSource = MessageFormatter.FormatText(getString(historyItem));
linkFlowContainer.AddLinks(formattedSource.Text, formattedSource.Links);
}