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

feat(windows): add WebViewBuilderExtWindows::with_scroll_bar_style #1344

Merged

Conversation

Themayu
Copy link
Contributor

@Themayu Themayu commented Aug 18, 2024

Resolves #1339.

Adds a with_scroll_bar_style option to the webview builder on Windows, that can be used to opt into Fluent Overlay style scrollbars in the WebView2 environment. Also, wry::webview2::InnerWebView::create_environment was modified to directly make use of the COM wrapper API on CoreWebView2EnvironmentOptions instead of using the COM API interface; the implementations of those interfaces deferred to this wrapper anyway, and the wrapper exposes a more Rust-friendly API than the interfaces do.

@Themayu Themayu marked this pull request as ready for review August 18, 2024 19:19
@Themayu Themayu requested a review from a team as a code owner August 18, 2024 19:19
Copy link
Contributor

github-actions bot commented Aug 19, 2024

Package Changes Through 937353e

There are 1 changes which include wry with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
wry 0.42.0 0.43.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@pewsheen
Copy link
Contributor

Looks good! Just some tiny format issues that don't pass the CI. Also, we'll need you to sign your commits so that CI can merge this PR.

@Themayu
Copy link
Contributor Author

Themayu commented Aug 19, 2024

Also, we'll need you to sign your commits so that CI can merge this PR.

I followed those exact instructions already, and have performed each commit with the flag GitHub tells you to use to sign them. Never mind, turned out I was using -s, not -S...

Use the CoreWebView2EnvironmentOptions API wrapper when creating a
WebView2 environment on Windows, as opposed to using the
ICoreWebView2EnvironmentOptions* COM interfaces. The wrapper exposes
the interface methods with a more Rust-like API.

It may be possible to do this with ICoreWebView2Controller as well, but
I don't feel like experimenting with that right now. This is just an
improvement I realised I could make while implementing tauri-apps#1339.

Signed-off-by: Jamie Ridding <[email protected]>
Signed-off-by: Jamie Ridding <[email protected]>
I used the wrong change type for wry in 1344-with_scroll_bar_style.
This commit upgrades the change type from a patch to a minor change.

Signed-off-by: Jamie Ridding <[email protected]>
Signed-off-by: Jamie Ridding <[email protected]>
@Themayu Themayu force-pushed the feat/windows-add-scrollbar-style-option branch from 346b99c to 937353e Compare August 19, 2024 03:31
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.

Windows: Support setting ICoreWebView2EnvironmentOptions8::ScrollBarStyle
2 participants