Child control fixes.

This commit is contained in:
Huo Yaoyuan 2017-06-15 22:42:15 +08:00
parent f03530cdd2
commit 3ec5d774df
3 changed files with 5 additions and 1 deletions

View File

@ -103,6 +103,8 @@ public override void Add(T drawable)
{
base.Add(drawable);
lastKnownScroll = float.NaN;
headerHeight = float.NaN;
footerHeight = float.NaN;
}
private float headerHeight, footerHeight;

View File

@ -22,7 +22,7 @@ public class OsuTabControl<T> : TabControl<T>
protected override TabItem<T> CreateTabItem(T value) => new OsuTabItem(value);
protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || Dropdown.Contains(screenSpacePos);
protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || Dropdown?.Contains(screenSpacePos) == true;
private static bool isEnumType => typeof(T).IsEnum;

View File

@ -135,6 +135,8 @@ public ProfileTabControl()
protected override TabItem<ProfileSection> CreateTabItem(ProfileSection value) => new ProfileTabItem(value);
protected override Dropdown<ProfileSection> CreateDropdown() => null;
private class ProfileTabItem : PageTabItem
{
public ProfileTabItem(ProfileSection value) : base(value)