From c650cbd2a70f1f333d2fc3b159a1ca10ace61fca Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 21 Jan 2021 14:56:10 +0900 Subject: [PATCH] Rename variable to something slightly better --- osu.Game/Graphics/Containers/SectionsContainer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/Containers/SectionsContainer.cs b/osu.Game/Graphics/Containers/SectionsContainer.cs index 5afe74db18..87c3007ca4 100644 --- a/osu.Game/Graphics/Containers/SectionsContainer.cs +++ b/osu.Game/Graphics/Containers/SectionsContainer.cs @@ -217,9 +217,9 @@ namespace osu.Game.Graphics.Containers // scroll offset is our fixed header height if we have it plus 20% of content height // plus 5% to fix floating point errors and to not have a section instantly unselect when scrolling upwards // but the 5% can't be bigger than our smallest section height, otherwise it won't get selected correctly - float sectionOrContent = Math.Min(smallestSectionHeight / 2.0f, scrollContainer.DisplayableContent * 0.05f); + float scrollIntoSectionAmount = Math.Min(smallestSectionHeight / 2.0f, scrollContainer.DisplayableContent * 0.05f); - float scrollOffset = fixedHeaderSize + scrollContainer.DisplayableContent * scroll_target_multiplier + sectionOrContent; + float scrollOffset = fixedHeaderSize + scrollContainer.DisplayableContent * scroll_target_multiplier + scrollIntoSectionAmount; if (Precision.AlmostBigger(0, scrollContainer.Current)) SelectedSection.Value = lastClickedSection as T ?? Children.FirstOrDefault();