From 0b750878551ded5bcfb7d008a1195d660465668a Mon Sep 17 00:00:00 2001 From: richarjiang Date: Wed, 3 Sep 2025 19:24:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E9=A3=9F=E7=89=A9?= =?UTF-8?q?=E7=9B=B8=E6=9C=BA=E7=95=8C=E9=9D=A2=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E5=92=8C=E5=8F=96=E6=99=AF=E6=A1=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/food-camera.tsx | 130 +++++++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 69 deletions(-) diff --git a/app/food-camera.tsx b/app/food-camera.tsx index 60b340b..267305c 100644 --- a/app/food-camera.tsx +++ b/app/food-camera.tsx @@ -144,34 +144,35 @@ export default function FoodCameraScreen() { - {/* 相机视图 */} - - {/* 头部导航 */} - router.back()} - transparent={true} - backColor={'#fff'} - /> + {/* 头部导航 */} + router.back()} + transparent={true} + backColor={'#333'} + /> - {/* 取景框和提示文本 */} - - 确保食物在辅助框内 - - {/* 取景框 */} - - - {/* 四个角的装饰 */} - - - - - + {/* 主要内容区域 */} + + {/* 取景框容器 */} + + 确保食物在取景框内 + + {/* 相机取景框 */} + + + {/* 取景框装饰 */} + + + + + + + @@ -198,31 +199,15 @@ export default function FoodCameraScreen() { {/* 底部控制栏 */} - + - {/* 相册按钮 */} - {/* - - - - 相册 - */} - {/* 拍照按钮 */} - - {/* AR按钮 */} - {/* - - AR - - AR - */} - - + + ); } @@ -232,6 +217,32 @@ const styles = StyleSheet.create({ flex: 1, backgroundColor: '#000', }, + contentContainer: { + flex: 1, + paddingTop: 100, + }, + cameraFrameContainer: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + paddingHorizontal: 20, + }, + cameraFrame: { + width: 300, + height: 300, + borderRadius: 20, + overflow: 'hidden', + borderWidth: 3, + borderColor: '#FFF', + backgroundColor: '#000', + }, + cameraView: { + flex: 1, + }, + viewfinderOverlay: { + flex: 1, + position: 'relative', + }, camera: { flex: 1, }, @@ -284,31 +295,12 @@ const styles = StyleSheet.create({ right: 0, zIndex: 10, }, - overlayContainer: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - paddingTop: 100, - }, hintText: { color: '#FFF', fontSize: 16, fontWeight: '500', - marginBottom: 30, + marginBottom: 20, textAlign: 'center', - textShadowColor: 'rgba(0, 0, 0, 0.75)', - textShadowOffset: { width: 0, height: 1 }, - textShadowRadius: 3, - }, - viewfinderContainer: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - }, - viewfinder: { - width: 280, - height: 280, - position: 'relative', }, corner: { position: 'absolute', @@ -345,7 +337,7 @@ const styles = StyleSheet.create({ flexDirection: 'row', justifyContent: 'center', paddingHorizontal: 20, - marginBottom: 20, + marginVertical: 20, }, mealTypeButton: { alignItems: 'center', @@ -372,11 +364,11 @@ const styles = StyleSheet.create({ color: '#333', }, bottomContainer: { - backgroundColor: 'rgba(0, 0, 0, 0.3)', + paddingBottom: 40, }, controlsContainer: { flexDirection: 'row', - justifyContent: 'space-around', + justifyContent: 'center', alignItems: 'center', paddingVertical: 20, paddingHorizontal: 40,