Skip to content

Refactor leaderboard statistics component to use text flows#37069

Open
LiquidPL wants to merge 1 commit intoppy:masterfrom
LiquidPL:leaderboard-statistic-refactor
Open

Refactor leaderboard statistics component to use text flows#37069
LiquidPL wants to merge 1 commit intoppy:masterfrom
LiquidPL:leaderboard-statistic-refactor

Conversation

@LiquidPL
Copy link
Contributor

This is done to avoid any baseline alignment issues that occur when the name/label are laid out horizontally, as mentioned in #37056.

Also extracts it to a separate component, to be reused on the playlists leaderboard.

Expanded layout on the playlists leaderboard POC:

Screenshot_20260323_133458

Compact layout (I wonder if it'd look better if the lines were aligned to the right instead):

Screenshot_20260323_133520

Regular beatmap leaderboard:

image image

Supersedes #37056.

This is done to avoid any baseline alignment issues that occur when the
name/label are laid out horizontally, as mentioned in
ppy#37056.

Also extracts it to a separate component, to be reused on the playlists
leaderboard.

Supersedes ppy#37056.
{
t.Font = OsuFont.Style.Body;
t.Colour = perfect ? colours.Lime1 : Color4.White;
t.Padding = new MarginPadding { Left = direction == Direction.Horizontal ? 0 : 5 };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just realized this is going to cause every word in value to have padding if there's multiple words in it. I wonder if this is even likely to happen, given that in most cases what goes into value is going to be a single number.

Alternatively I could just insert a single space between name and value instead of messing around with padding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant