From 4da051bb50dbeb2d8aec45217c5705a414463af0 Mon Sep 17 00:00:00 2001 From: Violet Caulfield Date: Sun, 12 Jan 2025 08:48:27 -0600 Subject: [PATCH] scaling changes --- components/Global/components/track.tsx | 6 ++++-- components/Global/helpers/runtimeticks.tsx | 4 +++- components/Player/component.tsx | 9 +++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/components/Global/components/track.tsx b/components/Global/components/track.tsx index 10e982fc..892c3d7f 100644 --- a/components/Global/components/track.tsx +++ b/components/Global/components/track.tsx @@ -46,8 +46,10 @@ export default function Track({ paddingVertical={"$2"} paddingHorizontal={"$1"} > - - { track.IndexNumber?.toString() ?? "" } + + + { track.IndexNumber?.toString() ?? "" } + diff --git a/components/Global/helpers/runtimeticks.tsx b/components/Global/helpers/runtimeticks.tsx index 847573d3..f03a10a7 100644 --- a/components/Global/helpers/runtimeticks.tsx +++ b/components/Global/helpers/runtimeticks.tsx @@ -20,7 +20,9 @@ function calculateRunTimeFromTicks(runTimeTicks: number) : string { const runTimeMinutes = Math.floor((runTimeTotalSeconds % 3600) / 60) const runTimeSeconds = runTimeTotalSeconds % 60; - return `${ runTimeHours != 0 ? `${padRunTimeNumber(runTimeHours)}:` : "" }${padRunTimeNumber(runTimeMinutes)}:${padRunTimeNumber(runTimeSeconds)}`; + return (runTimeHours != 0 ? `${padRunTimeNumber(runTimeHours)}:` : "") + + (runTimeHours != 0 ? `${padRunTimeNumber(runTimeMinutes)}:` : `${runTimeMinutes}:`) + + (padRunTimeNumber(runTimeSeconds)); } function padRunTimeNumber(number: number) : string { diff --git a/components/Player/component.tsx b/components/Player/component.tsx index 0c822701..27012651 100644 --- a/components/Player/component.tsx +++ b/components/Player/component.tsx @@ -23,7 +23,7 @@ export default function Player({ navigation }: { navigation : NavigationHelpers< const { apiClient } = useApiClientContext(); const { nowPlaying, progress, useSeekTo } = usePlayerContext(); - const { width } = useSafeAreaFrame(); + const { width, height } = useSafeAreaFrame(); return ( @@ -39,10 +39,11 @@ export default function Player({ navigation }: { navigation : NavigationHelpers< ) } imageStyle={{ - position: "relative", + position: "absolute", + alignSelf: "center", zIndex: -99, - width: width, - height: width, + width: height, + height: height, resizeMode: "cover", borderRadius: 2 }}