Merge pull request #22357 from EXtremeExploit/groups-probationary-badges

Make probationary groups a bit transparent
This commit is contained in:
Dean Herbert
2023-02-06 17:43:57 +09:00
committed by GitHub
3 changed files with 105 additions and 2 deletions

View File

@ -35,6 +35,11 @@ namespace osu.Game.Overlays.Profile.Header.Components
CornerRadius = 8;
TooltipText = group.Name;
if (group.IsProbationary)
{
Alpha = 0.6f;
}
}
[BackgroundDependencyLoader]
@ -47,7 +52,11 @@ namespace osu.Game.Overlays.Profile.Header.Components
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colourProvider?.Background6 ?? Colour4.Black
Colour = colourProvider?.Background6 ?? Colour4.Black,
// Normal badges background opacity is 75%, probationary is full opacity as the whole badge gets a bit transparent
// Goal is to match osu-web so this is the most accurate it can be, its a bit scuffed but it is what it is
// Source: https://github.com/ppy/osu-web/blob/master/resources/css/bem/user-group-badge.less#L50
Alpha = group.IsProbationary ? 1 : 0.75f,
},
innerContainer = new FillFlowContainer
{