mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 00:37:18 +08:00
Adjust button stylings
This commit is contained in:
parent
0eca9b9683
commit
9d5b81165e
@ -22,7 +22,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
typeof(LineGraph),
|
||||
typeof(ProfileHeaderTabControl),
|
||||
typeof(CentreHeaderContainer),
|
||||
typeof(BottomHeaderContainer)
|
||||
typeof(BottomHeaderContainer),
|
||||
typeof(ProfileHeaderButton)
|
||||
};
|
||||
|
||||
[Resolved]
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user