Fix weird slider ball sizing

This commit is contained in:
Dean Herbert 2020-04-02 19:30:58 +09:00
parent 7c428011a2
commit a3d4212462
4 changed files with 3 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -18,6 +18,8 @@ public class LegacySliderBall : CompositeDrawable
public LegacySliderBall(Drawable animationContent)
{
this.animationContent = animationContent;
AutoSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]

View File

@ -62,17 +62,7 @@ public Drawable GetDrawableComponent(ISkinComponent component)
// Math.Max((150 / Velocity) * GameBase.SIXTY_FRAME_TIME, GameBase.SIXTY_FRAME_TIME);
if (sliderBallContent != null)
{
var size = sliderBallContent.Size;
sliderBallContent.RelativeSizeAxes = Axes.Both;
sliderBallContent.Size = Vector2.One;
return new LegacySliderBall(sliderBallContent)
{
Size = size
};
}
return new LegacySliderBall(sliderBallContent);
return null;