From 8b76c9e87eb27f2faeddfb24f3a99362362ccf88 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 11 Nov 2023 12:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=92=AD=E6=94=BE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E6=8E=A7=E5=88=B6=E6=8C=89=E9=92=AE=E5=90=84?= =?UTF-8?q?=E5=B0=BA=E5=AF=B8=E5=B1=8F=E5=B9=95=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 2 +- src/screens/PlayDetail/Horizontal/Pic.tsx | 7 +++++-- .../PlayDetail/Horizontal/Player/ControlBtn.tsx | 2 +- src/screens/PlayDetail/Vertical/Pic.tsx | 2 +- .../Vertical/Player/components/ControlBtn.tsx | 6 +++--- src/screens/PlayDetail/Vertical/index.tsx | 12 ++++++------ 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 853cd0d..4a37dd9 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -8,7 +8,7 @@ - 添加是否忽略电池优化检查,用于提醒用户添加白名单,确保APP后台播放稳定性 - 在设置界面返回时,不再直接返回桌面,将回到进入设置界面前的界面,再非设置界面返回时才会返回桌面 - 更新播放栏进度条样式,进度条允许拖动调整进度 -- 优化播放详情页歌曲封面对屏幕大小的适配,修改横屏下的控制栏按钮布局 +- 优化播放详情页歌曲封面、控制按钮对各尺寸屏幕的适配,修改横屏下的控制栏按钮布局 ### 修复 diff --git a/src/screens/PlayDetail/Horizontal/Pic.tsx b/src/screens/PlayDetail/Horizontal/Pic.tsx index 26138c6..52f5068 100644 --- a/src/screens/PlayDetail/Horizontal/Pic.tsx +++ b/src/screens/PlayDetail/Horizontal/Pic.tsx @@ -35,10 +35,13 @@ export default memo(({ componentId }: { componentId: string }) => { setAnimated(true) }) - const imgWidth = Math.min((winWidth * 0.45 - marginLeft - BTN_WIDTH) * 0.76, (winHeight - StatusBar.currentHeight - HEADER_HEIGHT) * 0.62) + let imgWidth = Math.min((winWidth * 0.45 - marginLeft - BTN_WIDTH) * 0.76, (winHeight - StatusBar.currentHeight - HEADER_HEIGHT) * 0.62) + imgWidth -= imgWidth * (global.lx.fontSize - 1) * 0.3 + let contentHeight = (winHeight - StatusBar.currentHeight - HEADER_HEIGHT) * 0.66 + contentHeight -= contentHeight * (global.lx.fontSize - 1) * 0.2 return ( - + { musicInfo.pic diff --git a/src/screens/PlayDetail/Horizontal/Player/ControlBtn.tsx b/src/screens/PlayDetail/Horizontal/Player/ControlBtn.tsx index 420b852..10f3892 100644 --- a/src/screens/PlayDetail/Horizontal/Player/ControlBtn.tsx +++ b/src/screens/PlayDetail/Horizontal/Player/ControlBtn.tsx @@ -45,7 +45,7 @@ const TogglePlayBtn = ({ size }: { size: number }) => { export default () => { const { onLayout, height, width } = useLayout() - const size = Math.min(height * 0.65, (width - marginLeft) * 0.7 * 0.3) + const size = Math.min(height * 0.65, (width - marginLeft) * 0.52 * 0.3) * global.lx.fontSize return ( diff --git a/src/screens/PlayDetail/Vertical/Pic.tsx b/src/screens/PlayDetail/Vertical/Pic.tsx index 4821a96..c4d9d2d 100644 --- a/src/screens/PlayDetail/Vertical/Pic.tsx +++ b/src/screens/PlayDetail/Vertical/Pic.tsx @@ -34,7 +34,7 @@ export default ({ componentId }: { componentId: string }) => { }) // console.log('render pic') - const imgWidth = Math.min(winWidth * 0.8, (winHeight - StatusBar.currentHeight - HEADER_HEIGHT) * 0.58) + const imgWidth = Math.min(winWidth * 0.8, (winHeight - StatusBar.currentHeight - HEADER_HEIGHT) * 0.5) return ( diff --git a/src/screens/PlayDetail/Vertical/Player/components/ControlBtn.tsx b/src/screens/PlayDetail/Vertical/Player/components/ControlBtn.tsx index 8cfaeba..89a538d 100644 --- a/src/screens/PlayDetail/Vertical/Player/components/ControlBtn.tsx +++ b/src/screens/PlayDetail/Vertical/Player/components/ControlBtn.tsx @@ -45,7 +45,7 @@ const TogglePlayBtn = ({ size }: { size: number }) => { export default () => { const { onLayout, height, width } = useLayout() - const size = Math.min(height * 0.95, width * 0.5 * 0.3) + const size = Math.min(height * 0.5, width * 0.4 * 0.33) * global.lx.fontSize return ( @@ -63,8 +63,8 @@ const styles = createStyle({ justifyContent: 'space-evenly', alignItems: 'center', flex: 1, - paddingLeft: '2%', - paddingRight: '2%', + paddingLeft: '4%', + paddingRight: '4%', // paddingTop: '8.6%', // paddingBottom: '8.6%', // backgroundColor: 'rgba(0, 0, 0, .1)', diff --git a/src/screens/PlayDetail/Vertical/index.tsx b/src/screens/PlayDetail/Vertical/index.tsx index b4a97b7..05eb3fd 100644 --- a/src/screens/PlayDetail/Vertical/index.tsx +++ b/src/screens/PlayDetail/Vertical/index.tsx @@ -89,7 +89,7 @@ export default memo(({ componentId }: { componentId: string }) => { */} - + @@ -120,9 +120,9 @@ const styles = StyleSheet.create({ marginRight: 2, borderRadius: 2, }, - player: { - flex: 0, - height: '38%', - // backgroundColor: 'rgba(0,0,0,0.1)', - }, + // player: { + // flex: 0, + // height: '36%', + // // backgroundColor: 'rgba(0,0,0,0.1)', + // }, })