From a98f109d733836bb8bb6e72b93ad12d0f65bb106 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Sun, 21 May 2017 04:01:07 +0800 Subject: [PATCH] Use LayoutSize for header and footer layout. --- osu.Game/Graphics/Containers/SectionsContainer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Graphics/Containers/SectionsContainer.cs b/osu.Game/Graphics/Containers/SectionsContainer.cs index 09a85c7dd3..b0de350930 100644 --- a/osu.Game/Graphics/Containers/SectionsContainer.cs +++ b/osu.Game/Graphics/Containers/SectionsContainer.cs @@ -130,8 +130,8 @@ namespace osu.Game.Graphics.Containers { base.UpdateAfterChildren(); - float headerHeight = (ExpandableHeader?.Height ?? 0) + (FixedHeader?.Height ?? 0); - float footerHeight = Footer?.Height ?? 0; + float headerHeight = (ExpandableHeader?.LayoutSize.Y ?? 0) + (FixedHeader?.LayoutSize.Y ?? 0); + float footerHeight = Footer?.LayoutSize.Y ?? 0; if (headerHeight != this.headerHeight || footerHeight != this.footerHeight) { this.headerHeight = headerHeight; @@ -146,10 +146,10 @@ namespace osu.Game.Graphics.Containers if (expandableHeader != null && fixedHeader != null) { - float offset = Math.Min(expandableHeader.Height, currentScroll); + float offset = Math.Min(expandableHeader.LayoutSize.Y, currentScroll); expandableHeader.Y = -offset; - fixedHeader.Y = -offset + expandableHeader.Height; + fixedHeader.Y = -offset + expandableHeader.LayoutSize.Y; } Drawable bestMatch = null;