mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 14:18:23 +00:00
Fix text alpha bug
Summary: Set the default text radius to 0 so that text shadows aren't applied to every text node Reviewed By: mdvacca Differential Revision: D13027589 fbshipit-source-id: 4f7386059ac1654b8f77dddf9eb1b772f6049e23
This commit is contained in:
parent
53da585832
commit
fd78eee11b
@ -151,10 +151,14 @@ public abstract class ReactBaseTextShadowNode extends LayoutShadowNode {
|
||||
if (textShadowNode.mIsLineThroughTextDecorationSet) {
|
||||
ops.add(new SetSpanOperation(start, end, new StrikethroughSpan()));
|
||||
}
|
||||
if ((textShadowNode.mTextShadowOffsetDx != 0
|
||||
|| textShadowNode.mTextShadowOffsetDy != 0
|
||||
|| textShadowNode.mTextShadowRadius != 0)
|
||||
&& Color.alpha(textShadowNode.mTextShadowColor) != 0) {
|
||||
if (
|
||||
(
|
||||
textShadowNode.mTextShadowOffsetDx != 0 ||
|
||||
textShadowNode.mTextShadowOffsetDy != 0 ||
|
||||
textShadowNode.mTextShadowRadius != 0
|
||||
) &&
|
||||
Color.alpha(textShadowNode.mTextShadowColor) != 0
|
||||
) {
|
||||
ops.add(
|
||||
new SetSpanOperation(
|
||||
start,
|
||||
@ -270,7 +274,7 @@ public abstract class ReactBaseTextShadowNode extends LayoutShadowNode {
|
||||
|
||||
protected float mTextShadowOffsetDx = 0;
|
||||
protected float mTextShadowOffsetDy = 0;
|
||||
protected float mTextShadowRadius = 1;
|
||||
protected float mTextShadowRadius = 0;
|
||||
protected int mTextShadowColor = DEFAULT_TEXT_SHADOW_COLOR;
|
||||
|
||||
protected boolean mIsUnderlineTextDecorationSet = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user