From fa465f792da265a92ddcca27e2a94be29c209497 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Sun, 16 Feb 2025 13:36:57 +0800 Subject: [PATCH] opt: video width Closes #267 Signed-off-by: bggRGjQaUbCoE --- lib/pages/video/detail/view.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 4f6aa67b..8b77325f 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -822,8 +822,11 @@ class _VideoDetailPageState extends State ], ); } - final double videoWidth = + double videoWidth = max(context.height / context.width * 1.04, 1 / 2) * context.width; + if (context.width >= 560) { + videoWidth = min(videoWidth, context.width - 280); + } final double videoHeight = videoWidth * 9 / 16; return Row( children: [