1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 00:42:55 +08:00

Fix chat name backgrounds not dimming

This commit is contained in:
smoogipoo 2020-07-16 15:05:01 +09:00
parent f0fa859609
commit 96724bde32

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Effects; using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
@ -114,21 +115,26 @@ namespace osu.Game.Overlays.Chat
Colour = Color4.Black.Opacity(0.3f), Colour = Color4.Black.Opacity(0.3f),
Type = EdgeEffectType.Shadow, Type = EdgeEffectType.Shadow,
}, },
// Drop shadow effect
Child = new Container Child = new Container
{ {
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Y = 3,
Masking = true, Masking = true,
CornerRadius = 4, CornerRadius = 4,
EdgeEffect = new EdgeEffectParameters Children = new Drawable[]
{ {
Radius = 1, new Box
Colour = Color4Extensions.FromHex(message.Sender.Colour), {
Type = EdgeEffectType.Shadow, RelativeSizeAxes = Axes.Both,
}, Colour = Color4Extensions.FromHex(message.Sender.Colour),
Padding = new MarginPadding { Left = 3, Right = 3, Bottom = 1, Top = -3 }, },
Y = 3, new Container
Child = username, {
AutoSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = 4, Right = 4, Bottom = 1, Top = -2 },
Child = username
}
}
} }
}; };
} }