mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-25 01:39:23 +01:00
make the elementhelper's last column use AutoInlineIgnoreOverflow to avoid imperfect rounding causing it to move down
This commit is contained in:
parent
2084f927ae
commit
b8bf5c28d9
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@ namespace MLEM.Ui.Elements {
|
|||
public static Group[] MakeColumns(Element parent, Vector2 totalSize, int amount, bool setHeightBasedOnChildren = true) {
|
||||
var cols = new Group[amount];
|
||||
for (var i = 0; i < amount; i++) {
|
||||
cols[i] = new Group(Anchor.AutoInline, new Vector2(totalSize.X / amount, totalSize.Y), setHeightBasedOnChildren);
|
||||
var anchor = i == amount - 1 ? Anchor.AutoInlineIgnoreOverflow : Anchor.AutoInline;
|
||||
cols[i] = new Group(anchor, new Vector2(totalSize.X / amount, totalSize.Y), setHeightBasedOnChildren);
|
||||
if (parent != null)
|
||||
parent.AddChild(cols[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue