From 799dcf02cfe1eba9553a8f7dea46bf21e2113b8c Mon Sep 17 00:00:00 2001 From: tom-englert Date: Sat, 27 Jul 2024 15:02:57 +0200 Subject: [PATCH] Add smooth scrolling to settings panels and DecompilerTextView --- Directory.Packages.props | 2 +- ILSpy/Controls/ZoomScrollViewer.cs | 4 ++-- ILSpy/Options/DecompilerSettingsPanel.xaml | 4 ++-- ILSpy/Options/DisplaySettingsPanel.xaml | 3 ++- ILSpy/TextView/DecompilerTextView.xaml | 4 +++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index a99f48fccb..6d1e81e991 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -45,7 +45,7 @@ - + \ No newline at end of file diff --git a/ILSpy/Controls/ZoomScrollViewer.cs b/ILSpy/Controls/ZoomScrollViewer.cs index dff54789cf..21e258963b 100644 --- a/ILSpy/Controls/ZoomScrollViewer.cs +++ b/ILSpy/Controls/ZoomScrollViewer.cs @@ -108,7 +108,7 @@ static void CalculateZoomButtonCollapsed(DependencyObject d, DependencyPropertyC z.ComputedZoomButtonCollapsed = (z.AlwaysShowZoomButtons == false) && (z.CurrentZoom == 1.0); } - protected override void OnMouseWheel(MouseWheelEventArgs e) + protected override void OnPreviewMouseWheel(MouseWheelEventArgs e) { if (!e.Handled && Keyboard.Modifiers == ModifierKeys.Control && MouseWheelZoom) { @@ -165,7 +165,7 @@ protected override void OnMouseWheel(MouseWheelEventArgs e) e.Handled = true; } - base.OnMouseWheel(e); + base.OnPreviewMouseWheel(e); } internal static double RoundToOneIfClose(double val) diff --git a/ILSpy/Options/DecompilerSettingsPanel.xaml b/ILSpy/Options/DecompilerSettingsPanel.xaml index 9444a4cdc8..4941e01424 100644 --- a/ILSpy/Options/DecompilerSettingsPanel.xaml +++ b/ILSpy/Options/DecompilerSettingsPanel.xaml @@ -3,7 +3,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties" - xmlns:options="clr-namespace:ICSharpCode.ILSpy.Options"> + xmlns:toms="urn:TomsToolbox"> @@ -20,7 +20,7 @@ - +