浏览代码

layout: set node left, top, width, height on commit

mattias 11 月之前
父节点
当前提交
781e6b3d31
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/base/fresnel.layouter.pas

+ 4 - 0
src/base/fresnel.layouter.pas

@@ -1620,6 +1620,8 @@ begin
              +Item.ContentBoxHeight
              +ChildNode.PaddingBottom+ChildNode.BorderBottom;
     ChildEl.UsedBorderBox:=r;
+    ChildNode.Left:=NewLeft;
+    ChildNode.Top:=NewTop;
 
     // used contentbox
     r.Left:=r.Left+ChildNode.BorderLeft+ChildNode.PaddingLeft;
@@ -1627,6 +1629,8 @@ begin
     r.Right:=r.Left+Item.ContentBoxWidth;
     r.Bottom:=r.Top+Item.ContentBoxHeight;
     ChildEl.UsedContentBox:=r;
+    ChildNode.Width:=r.Width;
+    ChildNode.Height:=r.Height;
 
     {$IFDEF VerboseFresnelPlacing}
     writeln('TFLFlowLayouter.PlaceLineItems '+ChildEl.GetPath+' BorderBox='+ChildEl.UsedBorderBox.ToString);