Skip to content

Commit

Permalink
fix(linux): disable system appearance for scrollbars (#897)
Browse files Browse the repository at this point in the history
* fix(linux): disable system appearance for scrollbars

* Update mod.rs

* Update src/webview/webkitgtk/mod.rs

Co-authored-by: Ngo Iok Ui (Wu Yu Wei) <[email protected]>

---------

Co-authored-by: Ngo Iok Ui (Wu Yu Wei) <[email protected]>
  • Loading branch information
amrbashir and wusyong authored Mar 8, 2023
1 parent 15b4ddf commit 530a8b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/scrolbar-linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": "patch"
---

On Linux, disable system appearance for scrollbars.
5 changes: 5 additions & 0 deletions src/webview/webkitgtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ impl InnerWebView {
}
webview.grab_focus();

if let Some(context) = WebViewExt::context(&*webview) {
use webkit2gtk::WebContextExt;
context.set_use_system_appearance_for_scrollbars(false);
}

// Enable webgl, webaudio, canvas features as default.
if let Some(settings) = WebViewExt::settings(&*webview) {
settings.set_enable_webgl(true);
Expand Down

0 comments on commit 530a8b7

Please sign in to comment.