Skip to content

Commit f5fc337

Browse files
committed
fix video page in fullscreen mode
1 parent 6e46327 commit f5fc337

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

lib/bean/anime/anime_panel.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class BangumiPanel extends StatelessWidget {
113113
scrollDirection: Axis.vertical, // 将滚动方向改为竖直
114114
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
115115
crossAxisCount:
116-
!Utils.isCompact()
116+
(!Utils.isCompact() && !Utils.isTablet())
117117
? 10
118118
: 3,
119119
crossAxisSpacing: 10, // 间距

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void main() async {
3838
statusBarColor: Colors.transparent,
3939
));
4040
}
41-
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
41+
// SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
4242
try {
4343
await GStorage.init();
4444
} catch (e) {

lib/pages/video/video_page.dart

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,12 @@ class _VideoPageState extends State<VideoPage>
491491
MediaQuery.of(context).size.width)
492492
? Row(
493493
children: [
494-
playerBody,
494+
SizedBox(
495+
height: MediaQuery.of(context).size.height,
496+
width: (!videoController.androidFullscreen)
497+
? MediaQuery.of(context).size.height
498+
: MediaQuery.of(context).size.width,
499+
child: playerBody),
495500
videoController.androidFullscreen
496501
? Container()
497502
: BangumiPanel(
@@ -504,7 +509,12 @@ class _VideoPageState extends State<VideoPage>
504509
)
505510
: Column(
506511
children: [
507-
playerBody,
512+
SizedBox(
513+
height: videoController.androidFullscreen
514+
? MediaQuery.of(context).size.height
515+
: MediaQuery.of(context).size.width * 9 / 16,
516+
width: MediaQuery.of(context).size.width,
517+
child: playerBody),
508518
videoController.androidFullscreen
509519
? Container()
510520
: BangumiPanel(

0 commit comments

Comments
 (0)