Repository navigation
fix: 竖屏全屏弹幕与播控组件统一避让摄像头挖孔 - #164
Merged
Merged
Conversation
- 新增公共判断 portraitFullscreenTopInset(全屏+竖屏+未移除安全边距时返回进全屏前捕获的状态栏/挖孔高度) - 播控顶部组件与弹幕共用同一 topInset 和同一条件,分别以 Padding 避让 - 弹幕可视尺寸同步减去避让高度,轨道按缩小后的区域正确排布 - 横屏全屏、非全屏及开启移除安全边距时不受影响
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
竖屏全屏播放时,顶部播控组件和弹幕会被摄像头挖孔/状态栏遮挡
改动内容
fullscreen.dart:新增portraitFullscreenTopInset(),统一判断“全屏 + 竖屏 + 未移除安全边距 + topInset>0”,播控顶部组件与弹幕共用,保证两处行为一致。TopInsetPadding组件:inset 为 null 或 ≤0 时原样返回 child,否则按 top 加 padding。view.dart/app_bar_ani.dart:顶部控件与弹幕都改用TopInsetPadding做避让。pages/danmaku/view.dart:弹幕可视高度同步减去 inset,弹幕轨道按缩小后的区域正确排布。pages/video/view.dart:把进全屏前捕获的_fixedTopInset传给播放器与弹幕。生效范围
仅竖屏全屏生效;横屏全屏、非全屏、开启“移除安全边距”时均不避让。