1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:52:57 +08:00

Use empty drawables for spacing badges instead

This commit is contained in:
Joseph Madamba 2022-12-25 16:05:59 -08:00
parent 8e899c2e92
commit f959b02dc8

View File

@ -249,42 +249,27 @@ namespace osu.Game.Overlays.BeatmapSet
title.AddLink(titleText, LinkAction.SearchBeatmapSet, titleText);
title.AddArbitraryDrawable(new Container
{
AutoSizeAxes = Axes.Both,
Child = externalLink = new ExternalLinkButton
{
Margin = new MarginPadding { Left = 5 },
}
});
title.AddArbitraryDrawable(Empty().With(d => d.Width = 5));
title.AddArbitraryDrawable(externalLink = new ExternalLinkButton());
if (setInfo.NewValue.HasExplicitContent)
{
title.AddArbitraryDrawable(new Container
{
AutoSizeAxes = Axes.Both,
Child = new ExplicitContentBeatmapBadge { Margin = new MarginPadding { Left = 10 } },
});
title.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
title.AddArbitraryDrawable(new ExplicitContentBeatmapBadge());
}
if (setInfo.NewValue.FeaturedInSpotlight)
{
title.AddArbitraryDrawable(new Container
{
AutoSizeAxes = Axes.Both,
Child = new SpotlightBeatmapBadge { Margin = new MarginPadding { Left = 10 } },
});
title.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
title.AddArbitraryDrawable(new SpotlightBeatmapBadge());
}
artist.AddLink(artistText, LinkAction.SearchBeatmapSet, artistText);
if (setInfo.NewValue.TrackId != null)
{
artist.AddArbitraryDrawable(new Container
{
AutoSizeAxes = Axes.Both,
Child = new FeaturedArtistBeatmapBadge { Margin = new MarginPadding { Left = 10 } }
});
artist.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
artist.AddArbitraryDrawable(new FeaturedArtistBeatmapBadge());
}
updateExternalLink();