Files
streamyfin/utils/scaleSize.ts
Lance Chant bab11addee Attempt 2 at scaling
Added some more logic for scaling to hopefully have a uniform state

Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
2026-04-10 15:59:50 +02:00

10 lines
273 B
TypeScript

import { Dimensions } from "react-native";
const { width: W, height: H } = Dimensions.get("window");
export const scaleSize = (size: number): number => {
const widthRatio = W / 1920;
const heightRatio = H / 1080;
return size * Math.min(widthRatio, heightRatio);
};