Skip to content

Commit

Permalink
Apply padding to the text attachements
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Apr 25, 2024
1 parent b40b3b3 commit 550da33
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ void ParagraphShadowNode::layout(LayoutContext layoutContext) {
dynamic_cast<LayoutableShadowNode&>(*clonedShadowNode);

auto attachmentFrame = measurement.attachments[i].frame;
attachmentFrame.origin.x += this->yogaNode_.getLayout().padding(yoga::PhysicalEdge::Left);
attachmentFrame.origin.y += this->yogaNode_.getLayout().padding(yoga::PhysicalEdge::Top);

auto attachmentSize = roundToPixel<&ceil>(
attachmentFrame.size, layoutMetrics.pointScaleFactor);
auto attachmentOrigin = roundToPixel<&round>(
Expand Down

0 comments on commit 550da33

Please sign in to comment.