diff --git a/src/features/recorder/preview-modal.tsx b/src/features/recorder/preview-modal.tsx index f69a337..0c0c780 100644 --- a/src/features/recorder/preview-modal.tsx +++ b/src/features/recorder/preview-modal.tsx @@ -2,9 +2,15 @@ import { Icon } from '@/components/icon'; import { VideoView, type VideoPlayer } from 'expo-video'; import { Pressable, StyleSheet, Text, View } from 'react-native'; +import { GlassPill } from '@/components/glass-pill'; import { Spacing } from '@/constants/theme'; import { formatDurationPadded } from '@/utils/format'; +// Action badge diameter. With hitSlop 4 the effective tap target is 48pt (≥ the 44pt HIG +// minimum) while the ✂ and 🗑 hit areas — 8pt apart — still can't overlap. +const BADGE_SIZE = 40; +const BADGE_HIT_SLOP = 4; + type Props = { player: VideoPlayer; isPlaying: boolean; @@ -45,46 +51,52 @@ export function PreviewModal({ /> {!isPlaying && ( - - - + + + )} - + style={styles.close}> + + + - + style={styles.trim}> + + + - + style={styles.delete}> + + + - + {formatDurationPadded(positionMs)} / {formatDurationPadded(totalMs)} - + ); @@ -109,34 +121,39 @@ const styles = StyleSheet.create({ alignItems: 'center', justifyContent: 'center', }, + // Shape only — GlassPill owns the surface. paddingLeft optically centers the ▶ glyph. playBadge: { - width: 56, - height: 56, - borderRadius: 28, - backgroundColor: 'rgba(0,0,0,0.45)', + width: 64, + height: 64, + borderRadius: 32, alignItems: 'center', justifyContent: 'center', paddingLeft: 4, }, + // Badge shape only — GlassPill owns the surface (Liquid Glass on iOS 26+, dark scrim + // fallback), so no backgroundColor here. Position lives on the wrapping Pressable. badge: { - position: 'absolute', - top: Spacing.two, - width: 28, - height: 28, - borderRadius: 14, - backgroundColor: 'rgba(0,0,0,0.55)', + width: BADGE_SIZE, + height: BADGE_SIZE, + borderRadius: BADGE_SIZE / 2, alignItems: 'center', justifyContent: 'center', }, close: { + position: 'absolute', + top: Spacing.two, left: Spacing.two, }, delete: { + position: 'absolute', + top: Spacing.two, right: Spacing.two, }, - // Left of the delete badge (28 wide + an 8pt gap). + // Left of the delete badge (one badge width + an 8pt gap). trim: { - right: Spacing.two + 28 + Spacing.two, + position: 'absolute', + top: Spacing.two, + right: Spacing.two + BADGE_SIZE + Spacing.two, }, timeRow: { position: 'absolute', @@ -145,11 +162,11 @@ const styles = StyleSheet.create({ bottom: Spacing.two, alignItems: 'center', }, + // Shape only — GlassPill owns the surface, same as the badges above. timePill: { paddingHorizontal: Spacing.two, paddingVertical: 4, borderRadius: 12, - backgroundColor: 'rgba(0,0,0,0.55)', }, timeText: { color: '#fff',