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:
parent
33ab356dc5
commit
77748a5f93
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user