1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 19:27:31 +08:00

Merge pull request #18599 from hlysine/fix-score-panel-diff-name-overflow

Truncate difficulty name in score panel
This commit is contained in:
Dan Balasescu 2022-06-07 14:16:02 +09:00 committed by GitHub
commit 476a05cafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,7 @@ namespace osu.Game.Tests.Visual.Ranking
beatmap.Metadata.Author = author;
beatmap.Metadata.Title = "Verrrrrrrrrrrrrrrrrrry looooooooooooooooooooooooong beatmap title";
beatmap.Metadata.Artist = "Verrrrrrrrrrrrrrrrrrry looooooooooooooooooooooooong beatmap artist";
beatmap.DifficultyName = "Verrrrrrrrrrrrrrrrrrry looooooooooooooooooooooooong difficulty name";
return beatmap;
}

View File

@ -159,6 +159,8 @@ namespace osu.Game.Screens.Ranking.Expanded
Origin = Anchor.TopCentre,
Text = beatmap.DifficultyName,
Font = OsuFont.Torus.With(size: 16, weight: FontWeight.SemiBold),
MaxWidth = ScorePanel.EXPANDED_WIDTH - padding * 2,
Truncate = true,
},
new OsuTextFlowContainer(s => s.Font = OsuFont.Torus.With(size: 12))
{