Refactor drawable hierarchy to center properly

* Use FillFlowContainer.Spacing instead of manually applying margins.
* Use Update() for calculating button padding to preserve it after
  mod button expansion and adjust FooterButtonRandom to use this method
  while avoiding flickering.
* Expose mod display margin to clear it in the footer button.
This commit is contained in:
Bartłomiej Dach
2020-01-29 18:59:51 +01:00
parent ddec59ec91
commit c9dda78ded
4 changed files with 31 additions and 13 deletions

View File

@ -46,7 +46,6 @@ namespace osu.Game.Screens.Select
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Margin = new MarginPadding { Right = 10 }
});
}
@ -94,6 +93,7 @@ namespace osu.Game.Screens.Select
public FooterModDisplay()
{
AllowExpand = false;
IconsContainer.Margin = new MarginPadding();
}
}
}