1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 22:42:57 +08:00

Show scrollbar on expanded card content where applicable

This commit is contained in:
Bartłomiej Dach 2022-01-19 22:21:05 +01:00
parent 33ab356dc5
commit 77748a5f93
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -12,16 +12,12 @@ namespace osu.Game.Beatmaps.Drawables.Cards
{
public const float HEIGHT = 200;
public ExpandedContentScrollContainer()
{
ScrollbarVisible = false;
}
protected override void Update()
{
base.Update();
Height = Math.Min(Content.DrawHeight, HEIGHT);
ScrollbarVisible = allowScroll;
}
private bool allowScroll => !Precision.AlmostEquals(DrawSize, Content.DrawSize);