Compare commits
1 Commits
v3.0.1
...
carlhuting
Author | SHA1 | Date | |
---|---|---|---|
|
19035c90e9 |
@@ -3943,9 +3943,6 @@ static void YGRoundToPixelGrid(
|
|||||||
const float absoluteNodeLeft = absoluteLeft + nodeLeft;
|
const float absoluteNodeLeft = absoluteLeft + nodeLeft;
|
||||||
const float absoluteNodeTop = absoluteTop + nodeTop;
|
const float absoluteNodeTop = absoluteTop + nodeTop;
|
||||||
|
|
||||||
const float absoluteNodeRight = absoluteNodeLeft + nodeWidth;
|
|
||||||
const float absoluteNodeBottom = absoluteNodeTop + nodeHeight;
|
|
||||||
|
|
||||||
// If a node has a custom measure function we never want to round down its
|
// If a node has a custom measure function we never want to round down its
|
||||||
// size as this could lead to unwanted text truncation.
|
// size as this could lead to unwanted text truncation.
|
||||||
const bool textRounding = node->getNodeType() == YGNodeTypeText;
|
const bool textRounding = node->getNodeType() == YGNodeTypeText;
|
||||||
@@ -3970,22 +3967,18 @@ static void YGRoundToPixelGrid(
|
|||||||
|
|
||||||
node->setLayoutDimension(
|
node->setLayoutDimension(
|
||||||
YGRoundValueToPixelGrid(
|
YGRoundValueToPixelGrid(
|
||||||
absoluteNodeRight,
|
nodeWidth,
|
||||||
pointScaleFactor,
|
pointScaleFactor,
|
||||||
(textRounding && hasFractionalWidth),
|
(textRounding && hasFractionalWidth),
|
||||||
(textRounding && !hasFractionalWidth)) -
|
(textRounding && !hasFractionalWidth)),
|
||||||
YGRoundValueToPixelGrid(
|
|
||||||
absoluteNodeLeft, pointScaleFactor, false, textRounding),
|
|
||||||
YGDimensionWidth);
|
YGDimensionWidth);
|
||||||
|
|
||||||
node->setLayoutDimension(
|
node->setLayoutDimension(
|
||||||
YGRoundValueToPixelGrid(
|
YGRoundValueToPixelGrid(
|
||||||
absoluteNodeBottom,
|
nodeHeight,
|
||||||
pointScaleFactor,
|
pointScaleFactor,
|
||||||
(textRounding && hasFractionalHeight),
|
(textRounding && hasFractionalHeight),
|
||||||
(textRounding && !hasFractionalHeight)) -
|
(textRounding && !hasFractionalHeight)),
|
||||||
YGRoundValueToPixelGrid(
|
|
||||||
absoluteNodeTop, pointScaleFactor, false, textRounding),
|
|
||||||
YGDimensionHeight);
|
YGDimensionHeight);
|
||||||
|
|
||||||
const uint32_t childCount = YGNodeGetChildCount(node);
|
const uint32_t childCount = YGNodeGetChildCount(node);
|
||||||
|
Reference in New Issue
Block a user