|
@@ -923,7 +923,7 @@ begin
|
|
|
CurSpace:=ChildWidth;
|
|
|
end;
|
|
|
ChildPrefSize:=ChildEl.GetIntrinsicContentSize(aMode,CurSpace,NaN);
|
|
|
- //if ChildEl.Name='ButtonLabel' then
|
|
|
+ //if ChildEl.Name='CaptionLabel' then
|
|
|
// writeln('TFLFlowLayouter.ComputeLayoutContent ',ChildEl.GetPath,' MaxWidth=',CurSpace,' Preferred=',ChildPrefSize.ToString,' ChildPadBorderX=',ChildPadBorderX,' ChildPadBorderY=',ChildPadBorderY);
|
|
|
// apply min, max
|
|
|
if IsNan(ChildWidth) then
|
|
@@ -1204,8 +1204,9 @@ begin
|
|
|
|
|
|
if Commit then
|
|
|
begin
|
|
|
- if IsNan(MaxMainSize)
|
|
|
- or (JustifyContent in [CSSRegistry.kwLeft,CSSRegistry.kwStart,CSSRegistry.kwFlexStart]) then
|
|
|
+ if IsNan(MaxMainSize) then
|
|
|
+ MaxMainSize:=CurMainSize;
|
|
|
+ if (JustifyContent in [CSSRegistry.kwLeft,CSSRegistry.kwStart,CSSRegistry.kwFlexStart]) then
|
|
|
AdjustMainContentSize(CurMainSize)
|
|
|
else
|
|
|
AdjustMainContentSize(MaxMainSize);
|
|
@@ -1376,7 +1377,6 @@ end;
|
|
|
|
|
|
procedure TFLFlexLayouter.PlaceLineItems;
|
|
|
begin
|
|
|
-
|
|
|
inherited;
|
|
|
end;
|
|
|
|
|
@@ -1442,6 +1442,10 @@ begin
|
|
|
end;
|
|
|
if IsNan(FlexItem.Grow) then FlexItem.Grow:=0;
|
|
|
if IsNan(FlexItem.Shrink) then FlexItem.Shrink:=1;
|
|
|
+
|
|
|
+ {$IFDEF VerboseFlexLayout}
|
|
|
+ writeln('TFLFlexLayouter.ComputeChildAttributes ',ItemNode.Element.GetPath,' Basis=',FloatToCSSStr(FlexItem.Basis),' Grow=',FloatToCSSStr(FlexItem.Grow),' Shrink=',FloatToCSSStr(FlexItem.Shrink),' AlignSelf=',CSSRegistry.Keywords[FlexItem.AlignSelf],' CrossSize=',FloatToCSSStr(FlexItem.CrossContentSize));
|
|
|
+ {$ENDIF}
|
|
|
end;
|
|
|
|
|
|
procedure TFLFlexLayouter.Init;
|
|
@@ -1582,6 +1586,14 @@ begin
|
|
|
|
|
|
NewLeft:=Item.StaticLeft;
|
|
|
NewTop:=Item.StaticTop;
|
|
|
+ if IsNan(NewLeft) then
|
|
|
+ raise EFresnelLayout.Create('20241001111913');
|
|
|
+ if IsNan(NewTop) then
|
|
|
+ raise EFresnelLayout.Create('20241001111913');
|
|
|
+ if IsNan(Item.ContentBoxWidth) then
|
|
|
+ raise EFresnelLayout.Create('20241001111941');
|
|
|
+ if IsNan(Item.ContentBoxHeight) then
|
|
|
+ raise EFresnelLayout.Create('20241001111949');
|
|
|
|
|
|
if ChildEl.ComputedPosition in [CSSRegistry.kwRelative,CSSRegistry.kwSticky] then
|
|
|
begin
|