Skip to content
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

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

boa-z
Copy link
Contributor

@boa-z boa-z commented Feb 19, 2025

Fix: Toolbar edge obscured by screen in landscape mode

before:
1
after:
2

@Predidit
Copy link
Owner

感谢你的 PR

这个修改看上去非常棒,我会在CI通过后合并

@ErBWs
Copy link
Contributor

ErBWs commented Feb 19, 2025

测试有问题

@ErBWs
Copy link
Contributor

ErBWs commented Feb 19, 2025

iOS 上如果右侧没有挖孔,锁定和截图图标会一直保留在屏幕上

安卓应该也会有相同的问题,最好用 safeArea

@Predidit
Copy link
Owner

好的,那我们只能暂缓合并,我会在明天白天进行测试

具体是什么问题呢,这样我可以在测试时关注一下

@Predidit
Copy link
Owner

这里原来是 safeArea

safeArea 会让视频不居中,因为两边为缺口保留的区域宽度不同

@ErBWs
Copy link
Contributor

ErBWs commented Feb 19, 2025

只是对面板应用 safeArea,就像之前为底部小白条预留区域那样

@Predidit
Copy link
Owner

好主意

@@ -507,7 +507,7 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> {
(Utils.isDesktop() || !videoPageController.isFullscreen)
? Container()
: Positioned(
right: 0,
right: MediaQuery.of(context).padding.right,
Copy link
Contributor

@ErBWs ErBWs Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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(

Comment on lines 549 to 550
left: MediaQuery.of(context).padding.left,
right: MediaQuery.of(context).padding.right,
Copy link
Contributor

@ErBWs ErBWs Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,在 EmbeddedNativeControlArea 内部用 SafeArea

Comment on lines 704 to 705
left: MediaQuery.of(context).padding.left,
right: MediaQuery.of(context).padding.right,
Copy link
Contributor

@ErBWs ErBWs Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里底下有现成的 SafeArea,直接修改 left 和 right 就可以

@boa-z
Copy link
Contributor Author

boa-z commented Feb 20, 2025

感谢建议,我之后去修复。

@boa-z boa-z requested a review from ErBWs February 20, 2025 12:16
@Predidit Predidit merged commit 76945b3 into Predidit:main Feb 20, 2025
6 checks passed
@boa-z boa-z deleted the fix-video-page branch February 20, 2025 12:40
ErBWs pushed a commit to ErBWs/Kazumi that referenced this pull request Feb 23, 2025
* fix: solve the display problem in landscape mode

* fix: toolbar edge obscured by screen in landscape mode

(cherry picked from commit 76945b3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants