Skip to content

Commit 05fd10d

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Fix default shadow radius in TextAttributeProps (#36621)
Summary: Pull Request resolved: #36621 After D44302691 enabled textShadow, there was a subtle 1px shadow on any new text which I did't spot, but screenshot tests did (after commit which is non-ideal, but there is more work to make these land blocking). This is because unlike `ReactBaseTextShadowNode` in paper which defaults to a radius of zero (no shadow), `TextAttributes` in Fabric defaults to a radius of 1px. Just previously never displayed. Without shadow: https://pxl.cl/2z2wX With shadow: https://pxl.cl/2z2x0 This changes the default to zero, which will cause us to skip adding the span, and matches previous behavior in Paper. I double-checked the other props are defaulted the same way between `BaseTextShadowNode` (Paper) and `TextAttributes` (Fabric). Changelog: [Android][Fixed] - Fix default shadow radius in TextAttributeProps Reviewed By: javache Differential Revision: D44364446 fbshipit-source-id: d207367608291048001403d292f881c0842113f9
1 parent 776fe7a commit 05fd10d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public class TextAttributeProps {
9696

9797
protected float mTextShadowOffsetDx = 0;
9898
protected float mTextShadowOffsetDy = 0;
99-
protected float mTextShadowRadius = 1;
99+
protected float mTextShadowRadius = 0;
100100
protected int mTextShadowColor = DEFAULT_TEXT_SHADOW_COLOR;
101101

102102
protected boolean mIsUnderlineTextDecorationSet = false;

0 commit comments

Comments
 (0)