1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Add better fix for 1px bleed

This commit is contained in:
smoogipoo 2020-05-16 18:28:15 +09:00
parent 16cde20db4
commit 8c5ccf574b

View File

@ -52,12 +52,6 @@ namespace osu.Game.Screens.Ranking.Contracted
{
new Container
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Container
{
Name = "Background",
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerExponent = 2.5f,
@ -70,6 +64,12 @@ namespace osu.Game.Screens.Ranking.Contracted
Offset = new Vector2(0, 4)
},
Children = new Drawable[]
{
// Buffered container is used to prevent 1px bleed outside the masking region
new BufferedContainer
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Box
{
@ -81,32 +81,13 @@ namespace osu.Game.Screens.Ranking.Contracted
RelativeSizeAxes = Axes.Both,
User = score.User,
},
}
},
new Container
{
Name = "Background overlay",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Bottom = -1 },
Child = new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerExponent = 2.5f,
CornerRadius = 20,
Child = new Box
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourInfo.GradientVertical(Color4.Black.Opacity(0.5f), Color4Extensions.FromHex("#444"))
}
},
}
},
new Container
{
Name = "Foreground",
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
@ -172,8 +153,6 @@ namespace osu.Game.Screens.Ranking.Contracted
}
}
}
}
}
},
},
new Drawable[]