diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index 8a133a1d1e..f712509702 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -4,6 +4,7 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics; @@ -23,7 +24,7 @@ namespace osu.Game.Overlays private ProfileSection[] sections; private GetUserRequest userReq; protected ProfileHeader Header; - private SectionsContainer sectionsContainer; + private ProfileSectionsContainer sectionsContainer; private ProfileTabControl tabs; public const float CONTENT_X_MARGIN = 70; @@ -68,9 +69,8 @@ namespace osu.Game.Overlays Colour = OsuColour.Gray(0.2f) }); - Add(sectionsContainer = new SectionsContainer + Add(sectionsContainer = new ProfileSectionsContainer { - RelativeSizeAxes = Axes.Both, ExpandableHeader = Header = new ProfileHeader(), FixedHeader = tabs, HeaderBackground = new Box @@ -180,5 +180,22 @@ namespace osu.Game.Overlays bottom.Colour = colours.Yellow; } } + + private class ProfileSectionsContainer : SectionsContainer + { + public ProfileSectionsContainer() + { + RelativeSizeAxes = Axes.Both; + } + + protected override FlowContainer CreateScrollContentContainer() + => new FillFlowContainer + { + Direction = FillDirection.Vertical, + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + Spacing = new Vector2(0, 20), + }; + } } }