mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-11 03:21:59 +01:00
Added some more logic for scaling to hopefully have a uniform state Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
10 lines
273 B
TypeScript
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);
|
|
};
|