mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:02:55 +08:00
Merge pull request #9403 from smoogipoo/fix-results-ui-scale
Fix scroll container height on smaller ui scales
This commit is contained in:
commit
ed20bdf2e9
@ -70,41 +70,33 @@ namespace osu.Game.Screens.Ranking
|
||||
{
|
||||
new Drawable[]
|
||||
{
|
||||
new Container
|
||||
new VerticalScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
ScrollbarVisible = false,
|
||||
Child = new Container
|
||||
{
|
||||
new OsuScrollContainer
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollbarVisible = false,
|
||||
Child = new Container
|
||||
scorePanelList = new ScorePanelList
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = screen_height,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
scorePanelList = new ScorePanelList
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
SelectedScore = { BindTarget = SelectedScore },
|
||||
PostExpandAction = () => statisticsPanel.ToggleVisibility()
|
||||
},
|
||||
detachedPanelContainer = new Container<ScorePanel>
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
statisticsPanel = new StatisticsPanel
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Score = { BindTarget = SelectedScore }
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
SelectedScore = { BindTarget = SelectedScore },
|
||||
PostExpandAction = () => statisticsPanel.ToggleVisibility()
|
||||
},
|
||||
detachedPanelContainer = new Container<ScorePanel>
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
statisticsPanel = new StatisticsPanel
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Score = { BindTarget = SelectedScore }
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user