소스 검색

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);