1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:53:21 +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.AddLink(titleText, LinkAction.SearchBeatmapSet, titleText);
title.AddArbitraryDrawable(new Container title.AddArbitraryDrawable(Empty().With(d => d.Width = 5));
{ title.AddArbitraryDrawable(externalLink = new ExternalLinkButton());
AutoSizeAxes = Axes.Both,
Child = externalLink = new ExternalLinkButton
{
Margin = new MarginPadding { Left = 5 },
}
});
if (setInfo.NewValue.HasExplicitContent) if (setInfo.NewValue.HasExplicitContent)
{ {
title.AddArbitraryDrawable(new Container title.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
{ title.AddArbitraryDrawable(new ExplicitContentBeatmapBadge());
AutoSizeAxes = Axes.Both,
Child = new ExplicitContentBeatmapBadge { Margin = new MarginPadding { Left = 10 } },
});
} }
if (setInfo.NewValue.FeaturedInSpotlight) if (setInfo.NewValue.FeaturedInSpotlight)
{ {
title.AddArbitraryDrawable(new Container title.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
{ title.AddArbitraryDrawable(new SpotlightBeatmapBadge());
AutoSizeAxes = Axes.Both,
Child = new SpotlightBeatmapBadge { Margin = new MarginPadding { Left = 10 } },
});
} }
artist.AddLink(artistText, LinkAction.SearchBeatmapSet, artistText); artist.AddLink(artistText, LinkAction.SearchBeatmapSet, artistText);
if (setInfo.NewValue.TrackId != null) if (setInfo.NewValue.TrackId != null)
{ {
artist.AddArbitraryDrawable(new Container artist.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
{ artist.AddArbitraryDrawable(new FeaturedArtistBeatmapBadge());
AutoSizeAxes = Axes.Both,
Child = new FeaturedArtistBeatmapBadge { Margin = new MarginPadding { Left = 10 } }
});
} }
updateExternalLink(); updateExternalLink();