Skip to content

Commit

Permalink
fix video page in fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Predidit committed Sep 27, 2024
1 parent 6e46327 commit f5fc337
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/bean/anime/anime_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class BangumiPanel extends StatelessWidget {
scrollDirection: Axis.vertical, // 将滚动方向改为竖直
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount:
!Utils.isCompact()
(!Utils.isCompact() && !Utils.isTablet())
? 10
: 3,
crossAxisSpacing: 10, // 间距
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void main() async {
statusBarColor: Colors.transparent,
));
}
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
// SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
try {
await GStorage.init();
} catch (e) {
Expand Down
14 changes: 12 additions & 2 deletions lib/pages/video/video_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,12 @@ class _VideoPageState extends State<VideoPage>
MediaQuery.of(context).size.width)
? Row(
children: [
playerBody,
SizedBox(
height: MediaQuery.of(context).size.height,
width: (!videoController.androidFullscreen)
? MediaQuery.of(context).size.height
: MediaQuery.of(context).size.width,
child: playerBody),
videoController.androidFullscreen
? Container()
: BangumiPanel(
Expand All @@ -504,7 +509,12 @@ class _VideoPageState extends State<VideoPage>
)
: Column(
children: [
playerBody,
SizedBox(
height: videoController.androidFullscreen
? MediaQuery.of(context).size.height
: MediaQuery.of(context).size.width * 9 / 16,
width: MediaQuery.of(context).size.width,
child: playerBody),
videoController.androidFullscreen
? Container()
: BangumiPanel(
Expand Down

0 comments on commit f5fc337

Please sign in to comment.