1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-25 22:18:34 +01:00

change this to ceil so that elements don't just get cut off

This commit is contained in:
Ellpeck 2019-09-04 16:37:57 +02:00
parent 032923c660
commit 1ee7fafc23

View file

@ -72,7 +72,7 @@ namespace MLEM.Ui.Elements {
var lowestChild = this.GetLowestChild(false, true); var lowestChild = this.GetLowestChild(false, true);
// the max value of the scrollbar is the amount of non-scaled pixels taken up by overflowing components // the max value of the scrollbar is the amount of non-scaled pixels taken up by overflowing components
var childrenHeight = lowestChild.Area.Bottom - 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(); this.ScrollBar.MaxValue = ((childrenHeight - this.Area.Height) / this.Scale + this.ChildPadding.Y * 2).Ceil();
// update the render target // update the render target
var targetArea = this.GetRenderTargetArea(); var targetArea = this.GetRenderTargetArea();