Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/core/ui/styling/background.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,9 @@ function drawBoxShadow(view: View): void {
shadowLayer.allowsEdgeAntialiasing = true;
shadowLayer.contentsScale = Screen.mainScreen.scale;

// Shadow opacity is handled on the shadow's color instance
shadowLayer.shadowOpacity = boxShadow.color?.a ? boxShadow.color.a / 255 : 1;
// Shadow alpha is already carried by the CGColor set below, and CALayer multiplies
// shadowOpacity with it, so keep opacity at 1 to apply the alpha only once.
shadowLayer.shadowOpacity = 1;
// Use this multiplier to imitate CSS shadow blur
shadowLayer.shadowRadius = shadowRadius * 0.5;
shadowLayer.shadowColor = boxShadow.color?.ios?.CGColor;
Expand Down
Loading