Implement gap/row-gap/column-gap (within the C ABI)
Summary: This extracts the core changes from https://github.com/facebook/yoga/pull/1116, to support gap/row-gap/column-gap, mostly identical, apart from the rename of gaps -> gutters. The core functionality in this PR looks to be well tested from the fixtures added. I am not an expert in the internals of Yoga, but I am seeing everything that I would expect to. The space for the gap is accounted for in line-breaking, and the accumulated gaps limit the available line-length, before sizing flexible children, so items are sized correctly as to accommodate the gap. Then the gap is used for spacing during main axis and cross-axis justification. Changelog: [Genral][Added] - Implement gap/row-gap/column-gap (within the yoga C ABI) Reviewed By: javache Differential Revision: D39922410 fbshipit-source-id: 5850f22032169028bd8383b49dd240b335c11d3d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
05dd228317
commit
582533dbc6
@@ -232,6 +232,12 @@ WIN_EXPORT YGValue YGNodeStyleGetPadding(YGNodeConstRef node, YGEdge edge);
|
||||
WIN_EXPORT void YGNodeStyleSetBorder(YGNodeRef node, YGEdge edge, float border);
|
||||
WIN_EXPORT float YGNodeStyleGetBorder(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetGap(
|
||||
YGNodeRef node,
|
||||
YGGutter gutter,
|
||||
float gapLength);
|
||||
WIN_EXPORT float YGNodeStyleGetGap(YGNodeConstRef node, YGGutter gutter);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetWidth(YGNodeRef node, float width);
|
||||
WIN_EXPORT void YGNodeStyleSetWidthPercent(YGNodeRef node, float width);
|
||||
WIN_EXPORT void YGNodeStyleSetWidthAuto(YGNodeRef node);
|
||||
|
Reference in New Issue
Block a user