From a32da2ea1060b64ad523fc8f697e62dbfd4ab058 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 16 May 2025 17:45:32 +0900 Subject: [PATCH] Avoid animating list tail At very high scroll speeds (using pageup/pagedown) you would see a weird animation of panels appearing. This removes the animation for that edge case. --- osu.Game/Graphics/Carousel/Carousel.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/Carousel/Carousel.cs b/osu.Game/Graphics/Carousel/Carousel.cs index 0102434bbd..09f8962632 100644 --- a/osu.Game/Graphics/Carousel/Carousel.cs +++ b/osu.Game/Graphics/Carousel/Carousel.cs @@ -747,10 +747,12 @@ namespace osu.Game.Graphics.Carousel if (toDisplay.Contains(panel.Item!)) { - if (i == 0) - panel.DrawYPosition = panel.Item!.CarouselYPosition; - else + // Don't apply to the last because animating the tail of the list looks bad. + // It's usually off-screen anyway. + if (i > 0 && i < orderedPanels.Count - 1) panel.DrawYPosition = orderedPanels[i - 1].DrawYPosition; + else + panel.DrawYPosition = panel.Item!.CarouselYPosition; } } }