diff --git a/osu.Game/Graphics/UserInterface/BreadcrumbControl.cs b/osu.Game/Graphics/UserInterface/BreadcrumbControl.cs index 6014840a45..d4705c539a 100644 --- a/osu.Game/Graphics/UserInterface/BreadcrumbControl.cs +++ b/osu.Game/Graphics/UserInterface/BreadcrumbControl.cs @@ -15,18 +15,18 @@ namespace osu.Game.Graphics.UserInterface public class BreadcrumbControl : OsuTabControl { private const float padding = 10; - private readonly float itemChevronSize; - protected override TabItem CreateTabItem(T value) => new BreadcrumbTabItem(value, itemChevronSize) + protected virtual float ItemChevronSize => 10; + + protected override TabItem CreateTabItem(T value) => new BreadcrumbTabItem(value, ItemChevronSize) { AccentColour = AccentColour, }; - protected override float StripWidth() => base.StripWidth() - (padding + itemChevronSize); + protected override float StripWidth() => base.StripWidth() - (padding + ItemChevronSize); - public BreadcrumbControl(float itemChevronSize = 10) + public BreadcrumbControl() { - this.itemChevronSize = itemChevronSize; Height = 32; TabContainer.Spacing = new Vector2(padding, 0f); Current.ValueChanged += index => diff --git a/osu.Game/Overlays/OverlayHeaderBreadcrumbControl.cs b/osu.Game/Overlays/OverlayHeaderBreadcrumbControl.cs index d772aa0d46..eee43ec229 100644 --- a/osu.Game/Overlays/OverlayHeaderBreadcrumbControl.cs +++ b/osu.Game/Overlays/OverlayHeaderBreadcrumbControl.cs @@ -9,15 +9,14 @@ namespace osu.Game.Overlays { public class OverlayHeaderBreadcrumbControl : BreadcrumbControl { - private const float item_chevron_size = 8; - public OverlayHeaderBreadcrumbControl() - : base(item_chevron_size) { RelativeSizeAxes = Axes.X; } - protected override TabItem CreateTabItem(string value) => new ControlTabItem(value, item_chevron_size); + protected override float ItemChevronSize => 8; + + protected override TabItem CreateTabItem(string value) => new ControlTabItem(value, ItemChevronSize); private class ControlTabItem : BreadcrumbTabItem {