Browse Source

Update TomsToolbox to fix AdvancedScrollWheelBehavior and apply to all scroll viewers.

pull/3248/head
tom-englert 1 year ago
parent
commit
64c1d1bd08
  1. 2
      Directory.Packages.props
  2. 5
      ILSpy/App.xaml
  3. 5
      ILSpy/MainWindow.xaml
  4. 2
      ILSpy/Options/DecompilerSettingsPanel.xaml
  5. 2
      ILSpy/Options/DisplaySettingsPanel.xaml
  6. 3
      ILSpy/TextView/DecompilerTextView.xaml

2
Directory.Packages.props

@ -45,7 +45,7 @@
<PackageVersion Include="System.Reflection.Metadata" Version="8.0.0" /> <PackageVersion Include="System.Reflection.Metadata" Version="8.0.0" />
<PackageVersion Include="System.Resources.Extensions" Version="8.0.0" /> <PackageVersion Include="System.Resources.Extensions" Version="8.0.0" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" /> <PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageVersion Include="TomsToolbox.Wpf.Styles" Version="2.17.1" /> <PackageVersion Include="TomsToolbox.Wpf.Styles" Version="2.17.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" /> <PackageVersion Include="coverlet.collector" Version="6.0.2" />
</ItemGroup> </ItemGroup>
</Project> </Project>

5
ILSpy/App.xaml

@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:styles="urn:TomsToolbox.Wpf.Styles" xmlns:styles="urn:TomsToolbox.Wpf.Styles"
xmlns:toms="urn:TomsToolbox" xmlns:toms="urn:TomsToolbox"
xmlns:ilSpy="clr-namespace:ICSharpCode.ILSpy"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes" xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes"
StartupUri="MainWindow.xaml"> StartupUri="MainWindow.xaml">
<Application.Resources> <Application.Resources>
@ -25,5 +24,9 @@
<Setter Property="Padding" Value="9,1,9,1" /> <Setter Property="Padding" Value="9,1,9,1" />
</Style> </Style>
<Style TargetType="ScrollViewer">
<Setter Property="toms:AdvancedScrollWheelBehavior.Attach" Value="WithAnimation" />
</Style>
</Application.Resources> </Application.Resources>
</Application> </Application>

5
ILSpy/MainWindow.xaml

@ -35,8 +35,7 @@
ShowRoot="False" ShowRoot="False"
AllowDropOrder="True" AllowDropOrder="True"
AllowDrop="True" AllowDrop="True"
BorderThickness="0" Visibility="Visible" BorderThickness="0" Visibility="Visible">
toms:AdvancedScrollWheelBehavior.Attach="WithoutAnimation">
<tv:SharpTreeView.ItemContainerStyle> <tv:SharpTreeView.ItemContainerStyle>
<Style TargetType="tv:SharpTreeViewItem"> <Style TargetType="tv:SharpTreeViewItem">
@ -86,7 +85,7 @@
<ContentControl Content="{StaticResource SearchPane}" /> <ContentControl Content="{StaticResource SearchPane}" />
</DataTemplate> </DataTemplate>
<analyzers:AnalyzerTreeView x:Key="AnalyzerTreeView" toms:AdvancedScrollWheelBehavior.Attach="WithoutAnimation" /> <analyzers:AnalyzerTreeView x:Key="AnalyzerTreeView" />
<DataTemplate x:Key="AnalyzerPaneTemplate"> <DataTemplate x:Key="AnalyzerPaneTemplate">
<ContentControl Content="{StaticResource AnalyzerTreeView}" /> <ContentControl Content="{StaticResource AnalyzerTreeView}" />

2
ILSpy/Options/DecompilerSettingsPanel.xaml

@ -20,7 +20,7 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Margin="3" Grid.ColumnSpan="3" TextWrapping="Wrap" Text="{x:Static properties:Resources.DecompilerSettingsPanelLongText}" /> <TextBlock Margin="3" Grid.ColumnSpan="3" TextWrapping="Wrap" Text="{x:Static properties:Resources.DecompilerSettingsPanelLongText}" />
<ListBox Grid.Row="1" ItemsSource="{Binding Source={StaticResource SettingsCollection}}" toms:AdvancedScrollWheelBehavior.Attach="WithAnimation"> <ListBox Grid.Row="1" ItemsSource="{Binding Source={StaticResource SettingsCollection}}">
<ListBox.ItemContainerStyle> <ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem"> <Style TargetType="ListBoxItem">
<Setter Property="IsTabStop" Value="False"/> <Setter Property="IsTabStop" Value="False"/>

2
ILSpy/Options/DisplaySettingsPanel.xaml

@ -12,7 +12,7 @@
<UserControl.Resources> <UserControl.Resources>
<local:FontSizeConverter x:Key="fontSizeConv" /> <local:FontSizeConverter x:Key="fontSizeConv" />
</UserControl.Resources> </UserControl.Resources>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" toms:AdvancedScrollWheelBehavior.Attach="WithAnimation"> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<DockPanel> <DockPanel>
<Label DockPanel.Dock="Left" Content="{x:Static properties:Resources.DisplaySettingsPanel_Theme}" /> <Label DockPanel.Dock="Left" Content="{x:Static properties:Resources.DisplaySettingsPanel_Theme}" />

3
ILSpy/TextView/DecompilerTextView.xaml

@ -81,8 +81,7 @@
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
TextOptions.TextFormattingMode="{Binding CurrentZoom, ElementName=PART_ScrollViewer, Converter={x:Static local:ZoomLevelToTextFormattingModeConverter.Instance}}" TextOptions.TextFormattingMode="{Binding CurrentZoom, ElementName=PART_ScrollViewer, Converter={x:Static local:ZoomLevelToTextFormattingModeConverter.Instance}}"/>
toms:AdvancedScrollWheelBehavior.Attach="WithAnimation" />
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="WordWrap" <Trigger Property="WordWrap"
Value="True"> Value="True">

Loading…
Cancel
Save