From 8843d978957f486e5069c955f4d58f37005d9b05 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Sat, 5 Aug 2017 18:01:10 +0800 Subject: [PATCH] Remove depth setting in SectionsContainer and profile. --- osu.Game/Graphics/Containers/SectionsContainer.cs | 6 ++---- osu.Game/Overlays/UserProfileOverlay.cs | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/osu.Game/Graphics/Containers/SectionsContainer.cs b/osu.Game/Graphics/Containers/SectionsContainer.cs index 6dadf0b0b0..6e5c3c8183 100644 --- a/osu.Game/Graphics/Containers/SectionsContainer.cs +++ b/osu.Game/Graphics/Containers/SectionsContainer.cs @@ -128,13 +128,11 @@ namespace osu.Game.Graphics.Containers RelativeSizeAxes = Axes.Both, Masking = true, ScrollbarVisible = false, - Children = new Drawable[] { scrollContentContainer = CreateScrollContentContainer() }, - Depth = float.MaxValue + Children = new Drawable[] { scrollContentContainer = CreateScrollContentContainer() } }); AddInternal(headerBackgroundContainer = new Container { - RelativeSizeAxes = Axes.X, - Depth = float.MaxValue / 2 + RelativeSizeAxes = Axes.X }); originalSectionsMargin = scrollContentContainer.Margin; } diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index f604eb5cd2..f03ef3f1ed 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -169,13 +169,11 @@ namespace osu.Game.Overlays { header.User = user; - for (int i = 0; i < user.ProfileOrder.Length; i++) + foreach (string id in user.ProfileOrder) { - string id = user.ProfileOrder[i]; var sec = sections.FirstOrDefault(s => s.Identifier == id); if (sec != null) { - sec.Depth = -i; sectionsContainer.Add(sec); tabs.AddItem(sec); }