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

get lowest elements towards the end of the list

This commit is contained in:
Ellpeck 2019-11-05 22:08:19 +01:00
parent 6340f75acc
commit 061f8279d7

View file

@ -348,7 +348,7 @@ namespace MLEM.Ui.Elements {
continue;
if (child.Anchor > Anchor.TopRight && child.Anchor < Anchor.AutoLeft)
continue;
if (lowest == null || child.UnscrolledArea.Bottom > lowest.UnscrolledArea.Bottom)
if (lowest == null || child.UnscrolledArea.Bottom >= lowest.UnscrolledArea.Bottom)
lowest = child;
}
return lowest;
@ -361,7 +361,7 @@ namespace MLEM.Ui.Elements {
continue;
if (child.Anchor < Anchor.BottomRight && child.Anchor != Anchor.TopRight && child.Anchor != Anchor.CenterRight)
continue;
if (rightmost == null || child.UnscrolledArea.Right > rightmost.UnscrolledArea.Right)
if (rightmost == null || child.UnscrolledArea.Right >= rightmost.UnscrolledArea.Right)
rightmost = child;
}
return rightmost;
@ -376,7 +376,7 @@ namespace MLEM.Ui.Elements {
break;
if (condition != null && !condition(child))
continue;
if (lowest == null || child.UnscrolledArea.Bottom > lowest.UnscrolledArea.Bottom)
if (lowest == null || child.UnscrolledArea.Bottom >= lowest.UnscrolledArea.Bottom)
lowest = child;
}
return lowest;