Skip to content

Commit d0d1740

Browse files
committed
Use windows style scrollbars
1 parent 500ba21 commit d0d1740

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Files.App/UserControls/TerminalView.xaml.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,14 @@ public TerminalView()
125125

126126
private async void WebViewControl_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
127127
{
128-
await WebViewControl.EnsureCoreWebView2Async();
128+
var options = new CoreWebView2EnvironmentOptions()
129+
{
130+
// TODO: switch to "ScrollBarStyle" when available
131+
// https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.scrollbarstyle?view=webview2-dotnet-1.0.2470-prerelease
132+
AdditionalBrowserArguments = "--enable-features=OverlayScrollbar,OverlayScrollbarWinStyle,OverlayScrollbarWinStyleAnimation"
133+
};
134+
var environment = await CoreWebView2Environment.CreateWithOptionsAsync("", "", options);
135+
await WebViewControl.EnsureCoreWebView2Async(environment);
129136
//WebViewControl.CoreWebView2.OpenDevToolsWindow();
130137
WebViewControl.NavigationCompleted += WebViewControl_NavigationCompleted;
131138
WebViewControl.NavigationStarting += WebViewControl_NavigationStarting;

0 commit comments

Comments
 (0)