diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneBeatmapSearchFilter.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneBeatmapSearchFilter.cs index a237a8a5b5..b82ad86fb8 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneBeatmapSearchFilter.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneBeatmapSearchFilter.cs @@ -37,6 +37,7 @@ namespace osu.Game.Tests.Visual.UserInterface { new BeatmapSearchRulesetFilter(), new BeatmapSearchFilter(), + new SmallBeatmapSearchFilter() } }); } diff --git a/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilter.cs b/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilter.cs index acae5ce117..57e8282798 100644 --- a/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilter.cs +++ b/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilter.cs @@ -40,6 +40,8 @@ namespace osu.Game.Overlays.BeatmapListing protected class FilterTabItem : TabItem { + protected virtual float TextSize() => 13; + [Resolved] private OverlayColourProvider colourProvider { get; set; } @@ -53,7 +55,7 @@ namespace osu.Game.Overlays.BeatmapListing { text = new OsuSpriteText { - Font = OsuFont.GetFont(size: 13, weight: FontWeight.Regular), + Font = OsuFont.GetFont(size: TextSize(), weight: FontWeight.Regular), Text = GetText(value) }, new HoverClickSounds() diff --git a/osu.Game/Overlays/BeatmapListing/SmallBeatmapSearchFilter.cs b/osu.Game/Overlays/BeatmapListing/SmallBeatmapSearchFilter.cs new file mode 100644 index 0000000000..ca387f08cf --- /dev/null +++ b/osu.Game/Overlays/BeatmapListing/SmallBeatmapSearchFilter.cs @@ -0,0 +1,22 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Graphics.UserInterface; + +namespace osu.Game.Overlays.BeatmapListing +{ + public class SmallBeatmapSearchFilter : BeatmapSearchFilter + { + protected override TabItem CreateTabItem(T value) => new SmallTabItem(value); + + protected class SmallTabItem : FilterTabItem + { + public SmallTabItem(T value) + : base(value) + { + } + + protected override float TextSize() => 10; + } + } +}