diff --git a/osu.Game/Graphics/Containers/SectionsContainer.cs b/osu.Game/Graphics/Containers/SectionsContainer.cs index 99f43abe24..055e655f6e 100644 --- a/osu.Game/Graphics/Containers/SectionsContainer.cs +++ b/osu.Game/Graphics/Containers/SectionsContainer.cs @@ -94,7 +94,8 @@ namespace osu.Game.Graphics.Containers => new FillFlowContainer { Direction = FillDirection.Vertical, - AutoSizeAxes = Axes.Both + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, }; private List sections = new List(); @@ -133,7 +134,7 @@ namespace osu.Game.Graphics.Containers Add(ScrollContainer = new ScrollContainer() { RelativeSizeAxes = Axes.Both, - Masking = false, + Masking = true, Children = new Drawable[] { sectionsContainer = CreateScrollContentContainer() }, Depth = float.MaxValue }); diff --git a/osu.Game/Users/Profile/AboutSection.cs b/osu.Game/Users/Profile/AboutSection.cs index 24a4516441..b2e5ae1b35 100644 --- a/osu.Game/Users/Profile/AboutSection.cs +++ b/osu.Game/Users/Profile/AboutSection.cs @@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile { public override string Title => "me!"; - public AboutSection(User user) : base(user) + public AboutSection(User user) { } } diff --git a/osu.Game/Users/Profile/BeatmapsSection.cs b/osu.Game/Users/Profile/BeatmapsSection.cs index 1377702c4b..4068283c73 100644 --- a/osu.Game/Users/Profile/BeatmapsSection.cs +++ b/osu.Game/Users/Profile/BeatmapsSection.cs @@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile { public override string Title => "Beatmaps"; - public BeatmapsSection(User user) : base(user) + public BeatmapsSection(User user) { } } diff --git a/osu.Game/Users/Profile/HistoricalSection.cs b/osu.Game/Users/Profile/HistoricalSection.cs index 751f91e5bc..12d6d2a409 100644 --- a/osu.Game/Users/Profile/HistoricalSection.cs +++ b/osu.Game/Users/Profile/HistoricalSection.cs @@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile { public override string Title => "Historical"; - public HistoricalSection(User user) : base(user) + public HistoricalSection(User user) { } } diff --git a/osu.Game/Users/Profile/KudosuSection.cs b/osu.Game/Users/Profile/KudosuSection.cs index 61986ef5d8..312661f676 100644 --- a/osu.Game/Users/Profile/KudosuSection.cs +++ b/osu.Game/Users/Profile/KudosuSection.cs @@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile { public override string Title => "Kudosu!"; - public KudosuSection(User user) : base(user) + public KudosuSection(User user) { } } diff --git a/osu.Game/Users/Profile/MedalsSection.cs b/osu.Game/Users/Profile/MedalsSection.cs index 581d5e897c..7db8c69222 100644 --- a/osu.Game/Users/Profile/MedalsSection.cs +++ b/osu.Game/Users/Profile/MedalsSection.cs @@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile { public override string Title => "Medals"; - public MedalsSection(User user) : base(user) + public MedalsSection(User user) { } } diff --git a/osu.Game/Users/Profile/ProfileSection.cs b/osu.Game/Users/Profile/ProfileSection.cs index ce362109cc..035053463f 100644 --- a/osu.Game/Users/Profile/ProfileSection.cs +++ b/osu.Game/Users/Profile/ProfileSection.cs @@ -1,18 +1,41 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Sprites; +using osu.Game.Graphics; +using osu.Game.Graphics.Sprites; namespace osu.Game.Users.Profile { - public abstract class ProfileSection : Container + public abstract class ProfileSection : FillFlowContainer { - protected readonly User User; public abstract string Title { get; } - protected ProfileSection(User user) + protected ProfileSection() { - User = user; + Margin = new MarginPadding { Horizontal = UserProfile.CONTENT_X_MARGIN }; + Direction = FillDirection.Vertical; + AutoSizeAxes = Axes.Y; + RelativeSizeAxes = Axes.X; + Children = new Drawable[] + { + new OsuSpriteText + { + Text = Title, + TextSize = 16, + Font = @"Exo2.0-RegularItalic", + Margin = new MarginPadding { Vertical = 20 } + }, + new Box + { + RelativeSizeAxes = Axes.X, + Height = 1, + Colour = OsuColour.Gray(34), + Depth = float.MinValue + } + }; } } } diff --git a/osu.Game/Users/Profile/RanksSection.cs b/osu.Game/Users/Profile/RanksSection.cs index 450c1461e0..1c51866218 100644 --- a/osu.Game/Users/Profile/RanksSection.cs +++ b/osu.Game/Users/Profile/RanksSection.cs @@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile { public override string Title => "Ranks"; - public RanksSection(User user) : base(user) + public RanksSection(User user) { } } diff --git a/osu.Game/Users/Profile/RecentSection.cs b/osu.Game/Users/Profile/RecentSection.cs index 5a4e2707f8..96cf9d7a24 100644 --- a/osu.Game/Users/Profile/RecentSection.cs +++ b/osu.Game/Users/Profile/RecentSection.cs @@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile { public override string Title => "Recent"; - public RecentSection(User user) : base(user) + public RecentSection(User user) { } }