From 7a0464e8d64172bf4250a6a0ff32397c2c85be1e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 27 Jul 2022 11:52:28 +0200 Subject: [PATCH] fixed GetRightmostChild using the wrong variable for calculation --- MLEM.Ui/Elements/Element.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs index b0a84b9..ebd4a22 100644 --- a/MLEM.Ui/Elements/Element.cs +++ b/MLEM.Ui/Elements/Element.cs @@ -800,7 +800,7 @@ namespace MLEM.Ui.Elements { if (condition != null && !condition(child)) continue; var x = !child.Anchor.IsLeftAligned() ? child.UnscrolledArea.Width : child.UnscrolledArea.Right; - if (child.UnscrolledArea.Right >= rightmostX) { + if (x >= rightmostX) { rightmost = child; rightmostX = x; }