feature: add a button in diff view to ignore all whitespace changes (--ignore-all-space)

This commit is contained in:
leo 2024-09-30 11:34:09 +08:00
parent c1f6da1b31
commit d2a005c532
No known key found for this signature in database
10 changed files with 44 additions and 17 deletions

View file

@ -77,12 +77,19 @@
<Path Width="12" Height="12" Data="{StaticResource Icons.WordWrap}" Margin="0,2,0,0"/>
</ToggleButton>
<ToggleButton Classes="line_path"
Width="32"
IsChecked="{Binding IgnoreWhitespace, Mode=TwoWay}"
ToolTip.Tip="{DynamicResource Text.Diff.IgnoreWhitespace}">
<Path Width="14" Height="14" Stretch="Uniform" Data="{StaticResource Icons.Whitespace}"/>
</ToggleButton>
<ToggleButton Classes="line_path"
Width="32"
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView, Mode=TwoWay}"
IsVisible="{Binding IsTextDiff}"
ToolTip.Tip="{DynamicResource Text.Diff.ShowHiddenSymbols}">
<Path Width="11" Height="11" Stretch="Uniform" Data="{StaticResource Icons.Whitespace}" Margin="0,1,0,0"/>
<Path Width="11" Height="11" Stretch="Uniform" Data="{StaticResource Icons.HiddenSymbol}" Margin="0,1,0,0"/>
</ToggleButton>
<ToggleButton Classes="line_path"