Merge pull request #5709 from peppy/fix-context-menu-in-chat

Fix chat context menus displaying out-of-bounds
This commit is contained in:
Dan Balasescu 2019-08-14 11:40:23 +09:00 committed by GitHub
commit 8307ee330c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,27 +30,24 @@ namespace osu.Game.Overlays.Chat
[BackgroundDependencyLoader]
private void load()
{
Children = new Drawable[]
Child = new OsuContextMenuContainer
{
scroll = new OsuScrollContainer
RelativeSizeAxes = Axes.Both,
Masking = true,
Child = scroll = new OsuScrollContainer
{
RelativeSizeAxes = Axes.Both,
// Some chat lines have effects that slightly protrude to the bottom,
// which we do not want to mask away, hence the padding.
Padding = new MarginPadding { Bottom = 5 },
Child = new OsuContextMenuContainer
Child = ChatLineFlow = new ChatLineContainer
{
Padding = new MarginPadding { Left = 20, Right = 20 },
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Child = ChatLineFlow = new ChatLineContainer
{
Padding = new MarginPadding { Left = 20, Right = 20 },
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
}
},
}
Direction = FillDirection.Vertical,
}
},
};
newMessagesArrived(Channel.Messages);