Merge pull request #1082 from huoyaoyuan/depth

Remove depth setting in SectionsContainer and profile.
This commit is contained in:
Dean Herbert
2017-08-07 07:28:09 +09:00
committed by GitHub
2 changed files with 3 additions and 7 deletions

View File

@ -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;
}

View File

@ -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);
}