1
0
mirror of https://github.com/ppy/osu synced 2025-03-23 03:16:53 +00:00

Fix scroll container height on smaller ui scales

This commit is contained in:
smoogipoo 2020-06-30 16:36:53 +09:00
parent 50ae69b111
commit 1701c844a6

View File

@ -70,19 +70,13 @@ namespace osu.Game.Screens.Ranking
{
new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new OsuScrollContainer
new VerticalScrollContainer
{
RelativeSizeAxes = Axes.Both,
ScrollbarVisible = false,
Child = new Container
{
RelativeSizeAxes = Axes.X,
Height = screen_height,
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
scorePanelList = new ScorePanelList
@ -103,8 +97,6 @@ namespace osu.Game.Screens.Ranking
}
}
},
}
}
},
new[]
{
@ -277,5 +269,23 @@ namespace osu.Game.Screens.Ranking
detachedPanel = null;
}
}
private class VerticalScrollContainer : OsuScrollContainer
{
protected override Container<Drawable> Content => content;
private readonly Container content;
public VerticalScrollContainer()
{
base.Content.Add(content = new Container { RelativeSizeAxes = Axes.X });
}
protected override void Update()
{
base.Update();
content.Height = Math.Max(screen_height, DrawHeight);
}
}
}
}