This commit is contained in:
2022-03-05 08:40:18 +08:00
parent bc5cf4afa5
commit 0c3b8c52bd
3 changed files with 10 additions and 5 deletions

View File

@ -122,8 +122,9 @@ namespace Billing.UI
{
return;
}
var padding = Padding;
var spacing = Spacing;
var lastHeight = 0d;
var lastHeight = padding.Top;
var rowHeight = RowHeight;
var groupHeight = GroupHeight;
foreach (var item in Children)
@ -154,7 +155,7 @@ namespace Billing.UI
{
itemHeight = rowHeight;
}
var rect = new Rectangle(0, lastHeight, width, itemHeight);
var rect = new Rectangle(padding.Left, lastHeight, width, itemHeight);
//item.Layout(rect);
LayoutChildIntoBoundingRegion(item, rect);
lastHeight += itemHeight + spacing;
@ -185,7 +186,8 @@ namespace Billing.UI
lastHeight += rowHeight + spacing;
}
}
lastSizeRequest = new SizeRequest(new Size(widthConstraint, lastHeight));
var padding = Padding;
lastSizeRequest = new SizeRequest(new Size(widthConstraint, lastHeight + padding.Top + padding.Bottom));
return lastSizeRequest;
}
}