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(view): 修复输入时弹窗会超出屏幕的问题 #28

Merged
merged 1 commit into from
Oct 30, 2020

Conversation

qwertyyb
Copy link
Owner

原方式设置数据后立刻通过window.frame去拿窗口的大小和位置信息是不正确的,由于此时窗口还没有更新,所以拿到的数据其实是上次布局后的矩形信息。
此次使用NSWindowDelegate的windowDidResize方法,在窗口大小发生变化时,立刻去检测更新窗口的位置,可以保证窗口按预期方式工作

原方式设置数据后立刻通过window.frame去拿窗口的大小和位置信息是不正确的,由于此时窗口还没有更新,所以拿到的数据其实是上次布局后的矩形信息。
此次使用NSWindowDelegate的windowDidResize方法,在窗口大小发生变化时,立刻去检测更新窗口的位置,可以保证窗口按预期方式工作
@qwertyyb qwertyyb added the bug Something isn't working label Oct 30, 2020
@qwertyyb qwertyyb merged commit 3544aa6 into develop Oct 30, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix/window-location branch October 30, 2020 06:23
qwertyyb added a commit that referenced this pull request Nov 9, 2020
* fix(view): 修复输入时弹窗会超出屏幕的问题 (#28)

* fix: 修复在输入第一个字符时,仍然会超出屏幕的问题 (#30)

* Feat/toast (#31)

* feat:添加新的中英文切换框提示

* feat: 添加中英文切换弹窗设置,可以设置中英文切换时弹窗的位置

* fix: 修复shift键和其它键一起使用时冲突的问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant