-
Notifications
You must be signed in to change notification settings - Fork 15
The default size cannot be set when creating a Webview directly. #30
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
Comments
我遇到了同样的问题,在创建Webview实例并且执行 后来我发现作者的主页 fork 了一个仓库 https://github.com/e3ndr/webview-nightly-build-fork 在 https://github.com/e3ndr/webview-nightly-build-fork/blob/build-latest-commit/webview.h 这个文件中有一处代码为:
|
@isinvon 感谢,我略微有些了解,我抽空看下 |
@isinvon 你好,我这边已做适配,在我电脑上测试已经可以。java项目中暂时只提交了win下x86_64的类库,后面再补全其他的。 webview: https://github.com/HKMV/webview-nightly-build-fork |
@HKMV 测试完美,真是太感谢您了!!!! |
Can confirm, NotJustAnna/webview fixes behavior highlighted by this issue and issue #34. 2025-04-16.08-51-03.mp4 |
I have fixed this problem above, you can take it as a reference, my repair is as follows: |
The fix was made mostly by being on the main repository, as SteffenL highlighted here: webview/webview#1296 (comment)
The fix on my fork was just removing the |
Use
Webview wv = new Webview(true, 800, 600);
create Webview;You will see that the window changes from small to large, instead of being 800x600 when it appears.
Looking at the source code, I found that
Webview(true, 800, 600)
only calls thesetSize
method internally, and does not set the initial size.How do I set the default size during initialization?
OS:Windows11
JDK: OpenJDK21
The text was updated successfully, but these errors were encountered: