fix: 番剧横屏显示错误;微调横屏尺寸

This commit is contained in:
orz12
2024-03-22 00:47:08 +08:00
parent acafb86a18
commit 01c55ccb9a

View File

@@ -648,11 +648,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
// 系数是以下三个方程(分别代表特定平板、折叠屏内屏、普通手机横屏尺寸)的近似解 // 系数是以下三个方程(分别代表特定平板、折叠屏内屏、普通手机横屏尺寸)的近似解
// 820x+1180y+983.67z=450 // 820x+1180y+983.67z=450
// 1812x+2176y+1985.68z=680 // 1812x+2176y+1985.68z=680
// 1080x+2340y+1589.72z=540 // 1080x+2340y+1589.72z=560
final double videoheight = final double videoheight =
sqrt(context.height * context.width) * 12.972 - sqrt(context.height * context.width) * 12.555 -
context.height * 7.928 - context.height * 7.690 -
context.width * 4.923; context.width * 4.741;
final double videowidth = videoheight * 16 / 9; final double videowidth = videoheight * 16 / 9;
return Row( return Row(
children: [ children: [
@@ -818,16 +818,19 @@ class _VideoDetailPageState extends State<VideoDetailPage>
videoheight - videoheight -
MediaQuery.of(context).padding.top - MediaQuery.of(context).padding.top -
MediaQuery.of(context).padding.bottom, MediaQuery.of(context).padding.bottom,
child: (videoDetailController.videoType == child: CustomScrollView(
SearchType.video) key: const PageStorageKey<String>('简介'),
? const CustomScrollView( slivers: <Widget>[
slivers: [VideoIntroPanel()]) if (videoDetailController.videoType ==
: (videoDetailController.videoType == SearchType.video) ...[
SearchType.media_bangumi) const VideoIntroPanel(),
? Obx(() => BangumiIntroPanel( ] else if (videoDetailController.videoType ==
cid: videoDetailController.cid.value)) SearchType.media_bangumi) ...[
: const SizedBox(), Obx(() => BangumiIntroPanel(
) cid: videoDetailController.cid.value)),
]
],
))
], ],
), ),
SizedBox( SizedBox(
@@ -843,6 +846,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: TabBarView( child: TabBarView(
controller: videoDetailController.tabCtr, controller: videoDetailController.tabCtr,
children: <Widget>[ children: <Widget>[
if (videoDetailController.videoType ==
SearchType.video)
const CustomScrollView( const CustomScrollView(
slivers: [ slivers: [
RelatedVideoPanel(), RelatedVideoPanel(),
@@ -883,7 +888,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
), ),
); );
if (!horizontalScreen) { if (!horizontalScreen) {
Orientation orientation = MediaQuery.of(context).orientation;
if (Platform.isAndroid) { if (Platform.isAndroid) {
return PiPSwitcher( return PiPSwitcher(
childWhenDisabled: childWhenDisabled, childWhenDisabled: childWhenDisabled,