Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix top rank display not showing up on beatmaps with many difficulties #30579

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osu.Desktop/osu.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<ItemGroup Label="Package References">
<PackageReference Include="System.IO.Packaging" Version="8.0.1" />
<PackageReference Include="DiscordRichPresence" Version="1.2.1.24" />
<PackageReference Include="Velopack" Version="0.0.630-g9c52e40" />
<PackageReference Include="Velopack" Version="0.0.869" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bump makes me INCREDIBLY nervous, to the point where I'm hesitant approving this PR without doing an installer check on all platforms even if everything else looks fine (and it does). Should I be doing one?

Copy link
Member Author

@peppy peppy Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd hope we wouldn't need to check each velopack update.. but can understand the concern. Should I just revert for now?

((considering the next release is going to also turn on sdl3 it might be fine to just include this and test/fix quickly at the point of dropping the release))

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

considering the next release is going to also turn on sdl3 it might be fine to just include this and test/fix quickly at the point of dropping the release

I suppose, although installer failures, if any, tend to have the most... unmitigable (?) consequences, contrary to sdl3 deaths, which we mitigate just by reverting to having it off by default.

I'd looked at velopack changelogs and didn't see much of note other than @smoogipoo's appimage changes and reverts thereof, so maybe fine to just proceed...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the changelog looked tame enough that I was just thinking "let's get off the pre-releases we're currently on".

Copy link
Contributor

@smoogipoo smoogipoo Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 755 build (which is used by osu-deploy) is a prerelease build that already contains both the appimage change + revert. So there should be no issue.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a brief check on linux with osu-deploy it seems like things work, so I'm gonna cross fingers and hope for the best...

</ItemGroup>
<ItemGroup Label="Resources">
<EmbeddedResource Include="lazer.ico" />
Expand Down
38 changes: 32 additions & 6 deletions osu.Game/Screens/Select/BeatmapCarousel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,6 @@ public BeatmapCarousel(FilterCriteria initialCriteria)
InternalChild = new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
{
// Avoid clash between scrollbar and osu! logo.
Top = 10,
Bottom = 100,
},
Children = new Drawable[]
{
setPool,
Expand Down Expand Up @@ -1271,6 +1265,38 @@ protected override bool OnDragStart(DragStartEvent e)

return base.OnDragStart(e);
}

protected override ScrollbarContainer CreateScrollbar(Direction direction)
{
return new PaddedScrollbar();
}

protected partial class PaddedScrollbar : OsuScrollbar
{
public PaddedScrollbar()
: base(Direction.Vertical)
{
}
}

private const float top_padding = 10;
private const float bottom_padding = 70;

protected override float ToScrollbarPosition(float scrollPosition)
{
if (Precision.AlmostEquals(0, ScrollableExtent))
return 0;

return top_padding + (ScrollbarMovementExtent - (top_padding + bottom_padding)) * (scrollPosition / ScrollableExtent);
}

protected override float FromScrollbarPosition(float scrollbarPosition)
{
if (Precision.AlmostEquals(0, ScrollbarMovementExtent))
return 0;

return ScrollableExtent * ((scrollbarPosition - top_padding) / (ScrollbarMovementExtent - (top_padding + bottom_padding)));
}
}

protected override void Dispose(bool isDisposing)
Expand Down
6 changes: 3 additions & 3 deletions osu.Game/osu.Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<ItemGroup Label="Package References">
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="DiffPlex" Version="1.7.2" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.67" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.70" />
<PackageReference Include="Humanizer" Version="2.14.1" />
<PackageReference Include="MessagePack" Version="2.5.187" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.10" />
Expand All @@ -35,9 +35,9 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Realm" Version="11.5.0" />
<PackageReference Include="ppy.osu.Framework" Version="2024.1025.0" />
<PackageReference Include="ppy.osu.Framework" Version="2024.1111.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2024.1106.0" />
<PackageReference Include="Sentry" Version="4.12.1" />
<PackageReference Include="Sentry" Version="4.13.0" />
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
<PackageReference Include="SharpCompress" Version="0.38.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
Expand Down