mirror of https://github.com/ppy/osu
Fix "talking with" text overflowing when usernames are too long
This commit is contained in:
parent
bd11d5d29a
commit
af540de69b
|
@ -39,6 +39,7 @@ public partial class ChatTextBar : Container
|
||||||
|
|
||||||
private const float chatting_text_width = 220;
|
private const float chatting_text_width = 220;
|
||||||
private const float search_icon_width = 40;
|
private const float search_icon_width = 40;
|
||||||
|
private const float padding = 5;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OverlayColourProvider colourProvider)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
|
@ -71,9 +72,10 @@ private void load(OverlayColourProvider colourProvider)
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Width = chatting_text_width,
|
Width = chatting_text_width,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
Padding = new MarginPadding { Right = 5 },
|
Padding = new MarginPadding { Horizontal = padding },
|
||||||
Child = chattingText = new OsuSpriteText
|
Child = chattingText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
|
MaxWidth = chatting_text_width - padding * 2,
|
||||||
Font = OsuFont.Torus.With(size: 20),
|
Font = OsuFont.Torus.With(size: 20),
|
||||||
Colour = colourProvider.Background1,
|
Colour = colourProvider.Background1,
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
|
@ -97,7 +99,7 @@ private void load(OverlayColourProvider colourProvider)
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Right = 5 },
|
Padding = new MarginPadding { Right = padding },
|
||||||
Child = chatTextBox = new ChatTextBox
|
Child = chatTextBox = new ChatTextBox
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
|
|
Loading…
Reference in New Issue