1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 10:12:53 +08:00

Simplify show/hide logic

This commit is contained in:
Bartłomiej Dach 2020-02-02 17:41:42 +01:00
parent 72107c27c9
commit c479d0efa4

View File

@ -139,10 +139,7 @@ namespace osu.Game.Overlays.Profile.Header
anyInfoAdded |= tryAddInfo(FontAwesome.Solid.Link, websiteWithoutProtocol, user.Website);
// If no information was added to the bottomLinkContainer, hide it to avoid unwanted padding
if (anyInfoAdded)
bottomLinkContainer.Show();
else
bottomLinkContainer.Hide();
bottomLinkContainer.Alpha = anyInfoAdded ? 1 : 0;
}
private void addSpacer(OsuTextFlowContainer textFlow) => textFlow.AddArbitraryDrawable(new Container { Width = 15 });