diff --git a/osu.Game.Tests/Visual/Online/TestCaseUserProfileHeader.cs b/osu.Game.Tests/Visual/Online/TestCaseUserProfileHeader.cs index 531f30de83..e425c25787 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseUserProfileHeader.cs +++ b/osu.Game.Tests/Visual/Online/TestCaseUserProfileHeader.cs @@ -22,7 +22,8 @@ namespace osu.Game.Tests.Visual.Online typeof(LineGraph), typeof(ProfileHeaderTabControl), typeof(CentreHeaderContainer), - typeof(BottomHeaderContainer) + typeof(BottomHeaderContainer), + typeof(ProfileHeaderButton) }; [Resolved] diff --git a/osu.Game/Overlays/Profile/Header/CentreHeaderContainer.cs b/osu.Game/Overlays/Profile/Header/CentreHeaderContainer.cs index 0ad343bb7e..658dd79570 100644 --- a/osu.Game/Overlays/Profile/Header/CentreHeaderContainer.cs +++ b/osu.Game/Overlays/Profile/Header/CentreHeaderContainer.cs @@ -4,6 +4,7 @@ using System; using osu.Framework.Allocation; using osu.Framework.Bindables; +using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; @@ -104,7 +105,7 @@ namespace osu.Game.Overlays.Profile.Header RelativeSizeAxes = Axes.Y, Padding = new MarginPadding { Vertical = 10 }, Width = UserProfileOverlay.CONTENT_X_MARGIN, - Child = detailsToggleButton = new ProfileHeaderButton + Child = detailsToggleButton = new ExpandButton { RelativeSizeAxes = Axes.Y, Anchor = Anchor.Centre, @@ -115,7 +116,7 @@ namespace osu.Game.Overlays.Profile.Header { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Size = new Vector2(20), + Size = new Vector2(20, 12), Icon = FontAwesome.Solid.ChevronUp, }, } @@ -230,5 +231,15 @@ namespace osu.Game.Overlays.Profile.Header hiddenDetailGlobal.Content = user.Statistics?.Ranks.Global?.ToString("#,##0") ?? "-"; hiddenDetailCountry.Content = user.Statistics?.Ranks.Country?.ToString("#,##0") ?? "-"; } + + private class ExpandButton : ProfileHeaderButton + { + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + IdleColour = colours.CommunityUserGrayGreen; + HoverColour = colours.CommunityUserGrayGreen.Darken(0.2f); + } + } } } diff --git a/osu.Game/Overlays/Profile/Header/ProfileHeaderButton.cs b/osu.Game/Overlays/Profile/Header/ProfileHeaderButton.cs index 6d9ab7a4d8..e8c8788a10 100644 --- a/osu.Game/Overlays/Profile/Header/ProfileHeaderButton.cs +++ b/osu.Game/Overlays/Profile/Header/ProfileHeaderButton.cs @@ -2,10 +2,10 @@ // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; -using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Game.Graphics; using osu.Game.Graphics.Containers; using osuTK.Graphics; @@ -22,8 +22,9 @@ namespace osu.Game.Overlays.Profile.Header public ProfileHeaderButton() { - HoverColour = Color4.Black.Opacity(0.75f); - IdleColour = Color4.Black.Opacity(0.7f); + IdleColour = Color4.Black; + HoverColour = OsuColour.Gray(0.1f); + AutoSizeAxes = Axes.X; base.Content.Add(new CircularContainer