From 100532845b2d5ba27828ffc9b4f5c6a2836584f8 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Mon, 27 Jan 2020 15:07:24 +0300 Subject: [PATCH] Recolour CommentsContainer --- .../Visual/Online/TestSceneCommentsContainer.cs | 5 +++++ osu.Game/Overlays/Comments/CommentsContainer.cs | 13 +++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneCommentsContainer.cs b/osu.Game.Tests/Visual/Online/TestSceneCommentsContainer.cs index 8134c10750..3d63e2b07e 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneCommentsContainer.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneCommentsContainer.cs @@ -8,6 +8,8 @@ using osu.Game.Online.API.Requests; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics; using osu.Game.Overlays.Comments; +using osu.Game.Overlays; +using osu.Framework.Allocation; namespace osu.Game.Tests.Visual.Online { @@ -28,6 +30,9 @@ namespace osu.Game.Tests.Visual.Online protected override bool UseOnlineAPI => true; + [Cached] + private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple); + public TestSceneCommentsContainer() { BasicScrollContainer scroll; diff --git a/osu.Game/Overlays/Comments/CommentsContainer.cs b/osu.Game/Overlays/Comments/CommentsContainer.cs index d252083411..36b165c97d 100644 --- a/osu.Game/Overlays/Comments/CommentsContainer.cs +++ b/osu.Game/Overlays/Comments/CommentsContainer.cs @@ -8,7 +8,6 @@ using osu.Game.Online.API.Requests; using osu.Framework.Graphics; using osu.Framework.Bindables; using osu.Framework.Graphics.Shapes; -using osu.Game.Graphics; using osu.Game.Online.API.Requests.Responses; using System.Threading; using System.Linq; @@ -27,14 +26,12 @@ namespace osu.Game.Overlays.Comments [Resolved] private IAPIProvider api { get; set; } - [Resolved] - private OsuColour colours { get; set; } - private GetCommentsRequest request; private CancellationTokenSource loadCancellation; private int currentPage; private readonly Box background; + private readonly Box footerBackground; private readonly FillFlowContainer content; private readonly DeletedChildrenPlaceholder deletedChildrenPlaceholder; private readonly CommentsShowMoreButton moreButton; @@ -75,10 +72,9 @@ namespace osu.Game.Overlays.Comments AutoSizeAxes = Axes.Y, Children = new Drawable[] { - new Box + footerBackground = new Box { RelativeSizeAxes = Axes.Both, - Colour = OsuColour.Gray(0.2f) }, new FillFlowContainer { @@ -114,9 +110,10 @@ namespace osu.Game.Overlays.Comments } [BackgroundDependencyLoader] - private void load() + private void load(OverlayColourProvider colourProvider) { - background.Colour = colours.Gray2; + background.Colour = colourProvider.Background5; + footerBackground.Colour = colourProvider.Background4; } protected override void LoadComplete()