1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 14:43:03 +08:00

Merge pull request #22766 from Joehuu/fix-talking-with-text-overflow

Fix "talking with" text overflowing when usernames are too long
This commit is contained in:
Dean Herbert 2023-03-02 17:04:11 +09:00 committed by GitHub
commit 29be26b150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,7 @@ namespace osu.Game.Overlays.Chat
private const float chatting_text_width = 220;
private const float search_icon_width = 40;
private const float padding = 5;
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
@ -71,9 +72,10 @@ namespace osu.Game.Overlays.Chat
RelativeSizeAxes = Axes.Y,
Width = chatting_text_width,
Masking = true,
Padding = new MarginPadding { Right = 5 },
Padding = new MarginPadding { Horizontal = padding },
Child = chattingText = new OsuSpriteText
{
MaxWidth = chatting_text_width - padding * 2,
Font = OsuFont.Torus.With(size: 20),
Colour = colourProvider.Background1,
Anchor = Anchor.CentreRight,
@ -97,7 +99,7 @@ namespace osu.Game.Overlays.Chat
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Right = 5 },
Padding = new MarginPadding { Right = padding },
Child = chatTextBox = new ChatTextBox
{
Anchor = Anchor.CentreLeft,