Fix tab strip in BreadcrumbControl, allow strip height to be overriden.

This commit is contained in:
DrabWeb
2018-03-29 15:41:27 -03:00
parent 3d05798d80
commit e3218250d5
3 changed files with 19 additions and 6 deletions

View File

@ -27,6 +27,7 @@ namespace osu.Game.Graphics.UserInterface
protected override TabItem<T> CreateTabItem(T value) => new OsuTabItem(value);
protected virtual float StripWidth() => TabContainer.Children.Sum(c => c.IsPresent ? c.DrawWidth + TabContainer.Spacing.X : 0) - TabContainer.Spacing.X;
protected virtual float StripHeight() => 1;
private static bool isEnumType => typeof(T).IsEnum;
@ -38,7 +39,7 @@ namespace osu.Game.Graphics.UserInterface
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Height = 1,
Height = StripHeight(),
Colour = Color4.White.Opacity(0),
});