diff --git a/.changes/scrolbar-linux.md b/.changes/scrolbar-linux.md new file mode 100644 index 000000000..87b90be25 --- /dev/null +++ b/.changes/scrolbar-linux.md @@ -0,0 +1,5 @@ +--- +"wry": "patch" +--- + +On Linux, disable system appearance for scrollbars. diff --git a/src/webview/webkitgtk/mod.rs b/src/webview/webkitgtk/mod.rs index 1f3c87f8f..f26fdd24d 100644 --- a/src/webview/webkitgtk/mod.rs +++ b/src/webview/webkitgtk/mod.rs @@ -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);