From 13c7aa90e2abeb166d219e4ea75ba2a7f0551f35 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 24 Aug 2019 20:33:55 +0200 Subject: [PATCH] why was this here --- MLEM.Ui/Elements/Panel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM.Ui/Elements/Panel.cs b/MLEM.Ui/Elements/Panel.cs index 21175c2..bfde385 100644 --- a/MLEM.Ui/Elements/Panel.cs +++ b/MLEM.Ui/Elements/Panel.cs @@ -67,7 +67,7 @@ namespace MLEM.Ui.Elements { var firstChild = this.Children[1]; var lowestChild = this.GetLowestChild(false, true); // the max value of the scrollbar is the amount of non-scaled pixels taken up by overflowing components - var childrenHeight = lowestChild.Area.Bottom + 1 - firstChild.Area.Top; + var childrenHeight = lowestChild.Area.Bottom - firstChild.Area.Top; this.ScrollBar.MaxValue = ((childrenHeight - this.Area.Height) / this.Scale + this.ChildPadding.Y * 2).Floor(); // update the render target