1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 00:53:22 +08:00

Fix padding when user has no additional info

This commit is contained in:
TheWildTree 2020-01-30 18:10:40 +01:00
parent 682d0e6e71
commit 754200d843

View File

@ -132,6 +132,10 @@ namespace osu.Game.Overlays.Profile.Header
tryAddInfo(FontAwesome.Brands.Skype, user.Skype, @"skype:" + user.Skype + @"?chat");
tryAddInfo(FontAwesome.Brands.Lastfm, user.Lastfm, $@"https://last.fm/users/{user.Lastfm}");
tryAddInfo(FontAwesome.Solid.Link, websiteWithoutProtocol, user.Website);
// Hide the container to prevent adding unnecessary padding if it has no children other than the NewLine
if (!bottomLinkContainer.Children.Skip(1).Any())
bottomLinkContainer.Hide();
}
private void addSpacer(OsuTextFlowContainer textFlow) => textFlow.AddArbitraryDrawable(new Container { Width = 15 });