1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 23:42:55 +08:00

Refactor the menu's max height to be a property

This commit is contained in:
aitani9 2021-06-22 13:31:41 -07:00
parent bdc440f11c
commit 9cb9ef5c56

View File

@ -14,13 +14,15 @@ namespace osu.Game.Overlays.Settings
protected new class DropdownControl : OsuEnumDropdown<T>
{
protected virtual int MenuMaxHeight => 200;
public DropdownControl()
{
Margin = new MarginPadding { Top = 5 };
RelativeSizeAxes = Axes.X;
}
protected override DropdownMenu CreateMenu() => base.CreateMenu().With(m => m.MaxHeight = 200);
protected override DropdownMenu CreateMenu() => base.CreateMenu().With(m => m.MaxHeight = MenuMaxHeight);
}
}
}