From 727ae8cd2b884f14afc37bba557779bdf2590a2b Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Tue, 11 Mar 2025 21:35:47 +0800 Subject: [PATCH] opt: live room Signed-off-by: bggRGjQaUbCoE --- lib/pages/live_room/view.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart index baf11f89..8e6b750b 100644 --- a/lib/pages/live_room/view.dart +++ b/lib/pages/live_room/view.dart @@ -1,6 +1,6 @@ import 'dart:async'; import 'dart:io'; -import 'dart:math'; +import 'dart:ui'; import 'package:PiliPlus/http/live.dart'; import 'package:PiliPlus/pages/live_room/widgets/chat.dart'; @@ -239,7 +239,7 @@ class _LiveRoomPageState extends State ) : Column( children: [ - _buildAppBar, + Obx(() => _buildAppBar), _buildBodyH, ], ), @@ -420,13 +420,14 @@ class _LiveRoomPageState extends State Widget get _buildBodyH { double videoWidth = - max(context.height / context.width * 1.04, 0.58) * context.width; + clampDouble(context.height / context.width * 1.04, 0.58, 0.75) * + context.width; return Expanded( child: Row( children: [ Obx( () => Container( - color: Colors.black, + color: isFullScreen ? Colors.black : null, width: isFullScreen ? Get.size.width : videoWidth, height: isFullScreen ? Get.size.height : Get.size.width * 9 / 16, child: MediaQuery.removePadding(