1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:52:57 +08:00

Remove unnecessary manual autosize calculations in ToolbarRulesetSelector (#4943)

Remove unnecessary manual autosize calculations in ToolbarRulesetSelector
This commit is contained in:
Dean Herbert 2019-06-07 20:37:40 +09:00 committed by GitHub
commit 0e8c12e93f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,7 @@ namespace osu.Game.Overlays.Toolbar
public ToolbarRulesetSelector()
{
RelativeSizeAxes = Axes.Y;
AutoSizeAxes = Axes.X;
Children = new[]
{
@ -111,12 +112,6 @@ namespace osu.Game.Overlays.Toolbar
private void disabledChanged(bool isDisabled) => this.FadeColour(isDisabled ? Color4.Gray : Color4.White, 300);
protected override void Update()
{
base.Update();
Size = new Vector2(modeButtons.DrawSize.X, 1);
}
private void rulesetChanged(ValueChangedEvent<RulesetInfo> e)
{
foreach (ToolbarRulesetButton m in modeButtons.Children.Cast<ToolbarRulesetButton>())