-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: toolbar edge obscured by screen in landscape mode #740
Conversation
感谢你的 PR 这个修改看上去非常棒,我会在CI通过后合并 |
测试有问题 |
iOS 上如果右侧没有挖孔,锁定和截图图标会一直保留在屏幕上 安卓应该也会有相同的问题,最好用 safeArea |
好的,那我们只能暂缓合并,我会在明天白天进行测试 具体是什么问题呢,这样我可以在测试时关注一下 |
这里原来是 safeArea safeArea 会让视频不居中,因为两边为缺口保留的区域宽度不同 |
只是对面板应用 safeArea,就像之前为底部小白条预留区域那样 |
好主意 |
@@ -507,7 +507,7 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> { | |||
(Utils.isDesktop() || !videoPageController.isFullscreen) | |||
? Container() | |||
: Positioned( | |||
right: 0, | |||
right: MediaQuery.of(context).padding.right, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right: MediaQuery.of(context).padding.right, | |
right: 0, |
参考下面自定义底部组件,在 SlideTransition
内用 SafeArea
,保证侧边面板不会留在屏幕上
child: SlideTransition(
position: leftOffsetAnimation,
child: SafeArea(
top: false,
bottom: videoPageController.isFullscreen,
left: false,
right: videoPageController.isFullscreen,
child: Column(
left: MediaQuery.of(context).padding.left, | ||
right: MediaQuery.of(context).padding.right, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,在 EmbeddedNativeControlArea
内部用 SafeArea
left: MediaQuery.of(context).padding.left, | ||
right: MediaQuery.of(context).padding.right, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里底下有现成的 SafeArea,直接修改 left 和 right 就可以
感谢建议,我之后去修复。 |
* fix: solve the display problem in landscape mode * fix: toolbar edge obscured by screen in landscape mode (cherry picked from commit 76945b3)
Fix: Toolbar edge obscured by screen in landscape mode
before:


after: