blckngm / webview2

Rust bindings for WebView2
MIT License
73 stars 12 forks source link

Feature request: put_DefaultBackgroundColor #10

Closed wusyong closed 3 years ago

wusyong commented 3 years ago

First of all, thanksfor your work! I'm very glad to find this crate. The interface is super easy to use and pretty ergonomic! I have a requirement that need to construct a window with transparent background. And looks like the upstream updated this feature recently. Could we also update to it? I'm willing to help. Just maybe need to know how to run the idl2rs binary. It seems all interfaces are generated from that tool?

blckngm commented 3 years ago

I tried it and it seems to work:

https://github.com/sopium/webview2/commit/ca5dbd7959b030ed574b548457c6c16246284a7d#diff-2dc46f450fd671c92abaecb89b2b6842af16747d8a5de2082ae4663c07697b88R136-R153

But the SDK version is a prerelease and this feature only works with Edge dev/canary. I'm inclined to wait for a bit more stabilization before properly supporting it.

blckngm commented 3 years ago

BTW you can see how idl2rs is run here:

https://github.com/sopium/webview2/blob/4bd814aca6fe018655c8a0bf8cbda591e9d1b5b8/.github/workflows/ci.yml#L138-L141

wusyong commented 3 years ago

Thank you so much! It can definitely wait. I just need to make sure if it's possible to do so. I tried to update today but stuck on how to use those continuation iterfaces.

The idl2rs crate is really amazing too! It actually just took me a few minutes to get familiar with it.

wusyong commented 3 years ago

@sopium Thank you again for the help! Just tested it and it works perfectly! Btw, do you plan to publish a new version to crates.io? Because in the release of tauri, we need to publish to there too.

blckngm commented 3 years ago

Just released v0.1.0.