mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 18:07:27 +09:00
Fix scroll container height on smaller ui scales
This commit is contained in:
parent
50ae69b111
commit
1701c844a6
@ -70,19 +70,13 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new VerticalScrollContainer
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new OsuScrollContainer
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ScrollbarVisible = false,
|
ScrollbarVisible = false,
|
||||||
Child = new Container
|
Child = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = screen_height,
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
scorePanelList = new ScorePanelList
|
scorePanelList = new ScorePanelList
|
||||||
@ -103,8 +97,6 @@ namespace osu.Game.Screens.Ranking
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
new[]
|
new[]
|
||||||
{
|
{
|
||||||
@ -277,5 +269,23 @@ namespace osu.Game.Screens.Ranking
|
|||||||
detachedPanel = null;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user