1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 05:39:57 +08:00

Add required padding on either side of panels so selection can remain centered

This commit is contained in:
Dean Herbert
2025-01-15 20:24:41 +09:00
Unverified
parent 54f9cb7f68
commit 43b54623d9
+2 -2
View File
@@ -212,7 +212,7 @@ namespace osu.Game.Screens.SelectV2
private async Task updateYPositions(IEnumerable<CarouselItem> carouselItems, CancellationToken cancellationToken) => await Task.Run(() =>
{
float yPos = 0;
float yPos = visibleHalfHeight;
foreach (var item in carouselItems)
{
@@ -398,7 +398,7 @@ namespace osu.Game.Screens.SelectV2
if (displayedCarouselItems.Count > 0)
{
var lastItem = displayedCarouselItems[^1];
scroll.SetLayoutHeight((float)(lastItem.CarouselYPosition + lastItem.DrawHeight));
scroll.SetLayoutHeight((float)(lastItem.CarouselYPosition + lastItem.DrawHeight + visibleHalfHeight));
}
else
scroll.SetLayoutHeight(0);