From 19f04777c9e1e2a6082d653f7ba041ff9bc440b6 Mon Sep 17 00:00:00 2001 From: vineyardbovines Date: Tue, 9 Jun 2026 12:55:43 -0400 Subject: [PATCH] Match scanner scrim corners to the scan-frame outline Replaces the four-rect scrim with a single SVG path that punches a rounded-rect cutout, so the dark scrim's inner corners line up with the colored frame above it instead of being square. --- .../inviteFriends/InviteScannerScreen.tsx | 119 +++++++----------- 1 file changed, 44 insertions(+), 75 deletions(-) diff --git a/src/features/inviteFriends/InviteScannerScreen.tsx b/src/features/inviteFriends/InviteScannerScreen.tsx index 4101f3b8b2..ad200397d9 100644 --- a/src/features/inviteFriends/InviteScannerScreen.tsx +++ b/src/features/inviteFriends/InviteScannerScreen.tsx @@ -1,6 +1,7 @@ import {useCallback, useState} from 'react' -import {Pressable, StyleSheet, View} from 'react-native' +import {Pressable, StyleSheet, useWindowDimensions, View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' +import Svg, {Path} from 'react-native-svg' import { type BarcodeScanningResult, CameraView, @@ -19,6 +20,7 @@ import {Text} from '#/components/Typography' import {useAnalytics} from '#/analytics' const SCAN_FRAME_SIZE = 333 +const SCAN_FRAME_RADIUS = 16 export function InviteScannerScreen() { const {t: l} = useLingui() @@ -131,6 +133,23 @@ export function InviteScannerScreen() { + {/* scan-frame outline (the colored border around the cutout) */} + + - {/* top */} - - {/* bottom */} - - {/* left */} - - {/* right */} - - {/* scan-frame outline (the colored border around the cutout) */} - - + + + ) }