1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 14:23:14 +08:00

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

View File

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