1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Merge pull request #9747 from frenzibyte/dropdown-height-constraints

This commit is contained in:
Dean Herbert 2020-08-03 13:42:26 +09:00 committed by GitHub
commit eafe12aa02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 30 deletions

View File

@ -81,7 +81,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
{ {
} }
private class SettingsRoundDropdown : LadderSettingsDropdown<TournamentRound> private class SettingsRoundDropdown : SettingsDropdown<TournamentRound>
{ {
public SettingsRoundDropdown(BindableList<TournamentRound> rounds) public SettingsRoundDropdown(BindableList<TournamentRound> rounds)
{ {

View File

@ -1,26 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
namespace osu.Game.Tournament.Screens.Ladder.Components
{
public class LadderSettingsDropdown<T> : SettingsDropdown<T>
{
protected override OsuDropdown<T> CreateDropdown() => new DropdownControl();
private new class DropdownControl : SettingsDropdown<T>.DropdownControl
{
protected override DropdownMenu CreateMenu() => new Menu();
private new class Menu : OsuDropdownMenu
{
public Menu()
{
MaxHeight = 200;
}
}
}
}
}

View File

@ -6,11 +6,12 @@ using System.Collections.Specialized;
using System.Linq; using System.Linq;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Overlays.Settings;
using osu.Game.Tournament.Models; using osu.Game.Tournament.Models;
namespace osu.Game.Tournament.Screens.Ladder.Components namespace osu.Game.Tournament.Screens.Ladder.Components
{ {
public class SettingsTeamDropdown : LadderSettingsDropdown<TournamentTeam> public class SettingsTeamDropdown : SettingsDropdown<TournamentTeam>
{ {
public SettingsTeamDropdown(BindableList<TournamentTeam> teams) public SettingsTeamDropdown(BindableList<TournamentTeam> teams)
{ {

View File

@ -116,8 +116,6 @@ namespace osu.Game.Overlays.Settings.Sections
private class SkinDropdownControl : DropdownControl private class SkinDropdownControl : DropdownControl
{ {
protected override string GenerateItemText(SkinInfo item) => item.ToString(); protected override string GenerateItemText(SkinInfo item) => item.ToString();
protected override DropdownMenu CreateMenu() => base.CreateMenu().With(m => m.MaxHeight = 200);
} }
} }

View File

@ -38,6 +38,8 @@ namespace osu.Game.Overlays.Settings
Margin = new MarginPadding { Top = 5 }; Margin = new MarginPadding { Top = 5 };
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
} }
protected override DropdownMenu CreateMenu() => base.CreateMenu().With(m => m.MaxHeight = 200);
} }
} }
} }