UI: Make preview canvas responsive, scale sizes

This commit is contained in:
2026-06-12 23:54:42 +02:00
parent b8969415f4
commit e13cb05d48
2 changed files with 24 additions and 24 deletions
+7 -7
View File
@@ -77,7 +77,7 @@ export default function App() {
await saveSettings(updated); await saveSettings(updated);
setSettings(updated); setSettings(updated);
setShowEventModal(false); setShowEventModal(false);
// Resume start // Resume start
setPhotoUris([]); setPhotoUris([]);
setCaptureHistory([]); setCaptureHistory([]);
@@ -117,7 +117,7 @@ export default function App() {
const removedUris = updatedUris.splice(-lastCaptureCount, lastCaptureCount); const removedUris = updatedUris.splice(-lastCaptureCount, lastCaptureCount);
setPhotoUris(updatedUris); setPhotoUris(updatedUris);
setCaptureHistory((prev) => prev.slice(0, -1)); setCaptureHistory((prev) => prev.slice(0, -1));
// Clean up temp files // Clean up temp files
for (const uri of removedUris) { for (const uri of removedUris) {
try { try {
@@ -126,7 +126,7 @@ export default function App() {
console.warn('Failed to delete temp file:', e); console.warn('Failed to delete temp file:', e);
} }
} }
// Always let user retake // Always let user retake
setCurrentScreen('camera'); setCurrentScreen('camera');
}; };
@@ -163,13 +163,13 @@ export default function App() {
<GestureHandlerRootView style={styles.container}> <GestureHandlerRootView style={styles.container}>
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<StatusBar hidden={true} /> <StatusBar hidden={true} />
{/* {/*
Keep CameraScreen ALWAYS mounted in the background to prevent Keep CameraScreen ALWAYS mounted in the background to prevent
Android expo-camera hardware crashes when unmounting right after capture Android expo-camera hardware crashes when unmounting right after capture
*/} */}
<View <View
style={StyleSheet.absoluteFill} style={StyleSheet.absoluteFill}
pointerEvents={(currentScreen === 'preview' || currentScreen === 'admin') ? 'none' : 'auto'} pointerEvents={(currentScreen === 'preview' || currentScreen === 'admin') ? 'none' : 'auto'}
> >
<CameraScreen <CameraScreen
@@ -233,7 +233,7 @@ export default function App() {
</Text> </Text>
<TextInput <TextInput
style={styles.modalInput} style={styles.modalInput}
placeholder="Schnappix-Party" placeholder="z.B. Schnappix-Party"
placeholderTextColor="#666" placeholderTextColor="#666"
value={tempEventName} value={tempEventName}
onChangeText={setTempEventName} onChangeText={setTempEventName}
+17 -17
View File
@@ -699,8 +699,8 @@ const styles = StyleSheet.create({
backgroundColor: '#030308', backgroundColor: '#030308',
}, },
viewShotContainer: { viewShotContainer: {
width: 480, width: '100%',
height: 320, aspectRatio: 1.5,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: THEME.colors.background, backgroundColor: THEME.colors.background,
@@ -897,8 +897,8 @@ const styles = StyleSheet.create({
}, },
// ── Photo Canvases ── // ── Photo Canvases ──
singleCanvas: { singleCanvas: {
width: 480, width: '100%',
height: 320, height: '100%',
backgroundColor: '#fff', backgroundColor: '#fff',
padding: 0, padding: 0,
shadowColor: THEME.colors.gradientGlow, shadowColor: THEME.colors.gradientGlow,
@@ -913,30 +913,30 @@ const styles = StyleSheet.create({
resizeMode: 'cover', resizeMode: 'cover',
}, },
collageCanvas: { collageCanvas: {
width: 480, width: '100%',
height: 320, height: '100%',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
padding: 12, padding: 16,
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
}, },
collageFooter: { collageFooter: {
height: 35, height: 50,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
width: '100%', width: '100%',
borderTopWidth: 0.5, borderTopWidth: 1,
borderTopColor: '#e0e0e0', borderTopColor: '#e0e0e0',
marginTop: 6, marginTop: 10,
}, },
collageFooterText: { collageFooterText: {
fontSize: 10, fontSize: 16,
fontWeight: 'bold', fontWeight: 'bold',
color: '#333333', color: '#333333',
letterSpacing: 2, letterSpacing: 3,
}, },
collageFooterDate: { collageFooterDate: {
fontSize: 8, fontSize: 12,
color: '#666666', color: '#666666',
}, },
stripCanvas: {}, stripCanvas: {},
@@ -987,16 +987,16 @@ const styles = StyleSheet.create({
zIndex: 12, zIndex: 12,
}, },
dateOverlayText: { dateOverlayText: {
fontSize: 11, fontSize: 16,
fontWeight: 'bold', fontWeight: 'bold',
color: '#FFFFFF', color: '#FFFFFF',
textShadowColor: 'rgba(0, 0, 0, 0.8)', textShadowColor: 'rgba(0, 0, 0, 0.8)',
textShadowOffset: { width: 1, height: 1 }, textShadowOffset: { width: 1, height: 1 },
textShadowRadius: 3, textShadowRadius: 3,
backgroundColor: 'rgba(0, 0, 0, 0.35)', backgroundColor: 'rgba(0, 0, 0, 0.35)',
paddingVertical: 2, paddingVertical: 4,
paddingHorizontal: 6, paddingHorizontal: 8,
borderRadius: 3, borderRadius: 6,
}, },
// ── Loading ── // ── Loading ──
loadingOverlay: { loadingOverlay: {