From 5d4509150bf5b107f36c1123f9eaae81d4bc864f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 26 Jun 2024 11:56:58 +0900 Subject: [PATCH 1/2] Adjust beatmap carousel's spacing to remove dead-space As discussed in https://github.com/ppy/osu/discussions/28599. I think this feels better overall, and would like to apply the change before other design changes to the carousel. --- osu.Game/Screens/Select/BeatmapCarousel.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 49c23bdbbf6d..3aa980cec09d 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -1000,8 +1000,6 @@ private static void expirePanelImmediately(DrawableCarouselItem panel) return set; } - private const float panel_padding = 5; - /// /// Computes the target Y positions for every item in the carousel. /// @@ -1023,10 +1021,18 @@ private void updateYPositions() { case CarouselBeatmapSet set: { + bool isSelected = item.State.Value == CarouselItemState.Selected; + + float padding = isSelected ? 5 : -5; + + if (isSelected) + // double padding because we want to cancel the negative padding from the last item. + currentY += padding * 2; + visibleItems.Add(set); set.CarouselYPosition = currentY; - if (item.State.Value == CarouselItemState.Selected) + if (isSelected) { // scroll position at currentY makes the set panel appear at the very top of the carousel's screen space // move down by half of visible height (height of the carousel's visible extent, including semi-transparent areas) @@ -1048,7 +1054,7 @@ private void updateYPositions() } } - currentY += set.TotalHeight + panel_padding; + currentY += set.TotalHeight + padding; break; } } From e84daedbea9a5dadc6e47eb3a136e63333619eae Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 26 Jun 2024 12:01:38 +0900 Subject: [PATCH 2/2] Reduce length of fade-out when hiding beatmap panels --- osu.Game/Screens/Select/Carousel/DrawableCarouselItem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Select/Carousel/DrawableCarouselItem.cs b/osu.Game/Screens/Select/Carousel/DrawableCarouselItem.cs index 0c3de5848bc2..4c9ac57d9d52 100644 --- a/osu.Game/Screens/Select/Carousel/DrawableCarouselItem.cs +++ b/osu.Game/Screens/Select/Carousel/DrawableCarouselItem.cs @@ -144,9 +144,9 @@ protected virtual void ApplyState() } if (!Item.Visible) - this.FadeOut(300, Easing.OutQuint); + this.FadeOut(100, Easing.OutQuint); else - this.FadeIn(250); + this.FadeIn(400, Easing.OutQuint); } protected virtual void Selected()