From 5cc661e3141bd5d8861ba3c9a545404b2a82be9e Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Mon, 10 Mar 2025 15:41:39 +0800 Subject: [PATCH] opt: video width Closes #417 Signed-off-by: bggRGjQaUbCoE --- lib/pages/video/detail/view_v.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/video/detail/view_v.dart b/lib/pages/video/detail/view_v.dart index 441c6bf38..33b5a6816 100644 --- a/lib/pages/video/detail/view_v.dart +++ b/lib/pages/video/detail/view_v.dart @@ -1207,7 +1207,8 @@ class _VideoDetailPageVState extends State ); } double videoWidth = - max(context.height / context.width * 1.04, 1 / 2) * context.width; + clampDouble(context.height / context.width * 1.04, 0.5, 0.7) * + context.width; if (context.width >= 560) { videoWidth = min(videoWidth, context.width - 280); }