mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-29 16:14:59 +00:00
feature: add buttons to go to prev/next change in text diff view (#616)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
cd137e222c
commit
134c71064e
3 changed files with 161 additions and 16 deletions
|
@ -34,8 +34,24 @@
|
|||
|
||||
<!-- Toolbar Buttons -->
|
||||
<StackPanel Grid.Column="3" Margin="8,0,0,0" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Button Classes="icon_button"
|
||||
Width="28"
|
||||
Click="OnGotoPrevChange"
|
||||
IsVisible="{Binding IsTextDiff}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.Prev}">
|
||||
<Path Width="12" Height="12" Stretch="Uniform" Margin="0,6,0,0" Data="{StaticResource Icons.Up}"/>
|
||||
</Button>
|
||||
|
||||
<Button Classes="icon_button"
|
||||
Width="28"
|
||||
Click="OnGotoNextChange"
|
||||
IsVisible="{Binding IsTextDiff}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.Next}">
|
||||
<Path Width="12" Height="12" Stretch="Uniform" Margin="0,6,0,0" Data="{StaticResource Icons.Down}"/>
|
||||
</Button>
|
||||
|
||||
<Button Classes="icon_button"
|
||||
Width="32"
|
||||
Width="28"
|
||||
Command="{Binding IncrUnified}"
|
||||
IsVisible="{Binding IsTextDiff}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.VisualLines.Incr}">
|
||||
|
@ -46,7 +62,7 @@
|
|||
</Button>
|
||||
|
||||
<Button Classes="icon_button"
|
||||
Width="32"
|
||||
Width="28"
|
||||
Command="{Binding DecrUnified}"
|
||||
IsVisible="{Binding IsTextDiff}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.VisualLines.Decr}">
|
||||
|
@ -60,9 +76,7 @@
|
|||
</Button>
|
||||
|
||||
<ToggleButton Classes="line_path"
|
||||
Width="32" Height="18"
|
||||
Background="Transparent"
|
||||
Padding="9,6"
|
||||
Width="28"
|
||||
Command="{Binding ToggleFullTextDiff}"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFullTextDiff, Mode=OneWay}"
|
||||
IsVisible="{Binding IsTextDiff}"
|
||||
|
@ -71,9 +85,8 @@
|
|||
</ToggleButton>
|
||||
|
||||
<ToggleButton Classes="line_path"
|
||||
Width="32" Height="18"
|
||||
Width="28"
|
||||
Background="Transparent"
|
||||
Padding="9,6"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting, Mode=TwoWay}"
|
||||
IsVisible="{Binding IsTextDiff}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.SyntaxHighlight}">
|
||||
|
@ -81,9 +94,7 @@
|
|||
</ToggleButton>
|
||||
|
||||
<ToggleButton Classes="line_path"
|
||||
Width="32" Height="18"
|
||||
Background="Transparent"
|
||||
Padding="9,6"
|
||||
Width="28"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=EnableDiffViewWordWrap, Mode=TwoWay}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.ToggleWordWrap}">
|
||||
<ToggleButton.IsVisible>
|
||||
|
@ -97,14 +108,14 @@
|
|||
</ToggleButton>
|
||||
|
||||
<ToggleButton Classes="line_path"
|
||||
Width="32"
|
||||
Width="28"
|
||||
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"
|
||||
Width="28"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView, Mode=TwoWay}"
|
||||
IsVisible="{Binding IsTextDiff}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.ShowHiddenSymbols}">
|
||||
|
@ -112,16 +123,14 @@
|
|||
</ToggleButton>
|
||||
|
||||
<ToggleButton Classes="line_path"
|
||||
Width="32" Height="18"
|
||||
Background="Transparent"
|
||||
Padding="9,6"
|
||||
Width="28" Height="18"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSideBySideDiff, Mode=TwoWay}"
|
||||
IsVisible="{Binding IsTextDiff}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.SideBySide}">
|
||||
<Path Width="12" Height="12" Data="{StaticResource Icons.LayoutHorizontal}" Margin="0,2,0,0"/>
|
||||
</ToggleButton>
|
||||
|
||||
<Button Classes="icon_button" Width="32" Command="{Binding OpenExternalMergeTool}" ToolTip.Tip="{DynamicResource Text.Diff.UseMerger}">
|
||||
<Button Classes="icon_button" Width="28" Command="{Binding OpenExternalMergeTool}" ToolTip.Tip="{DynamicResource Text.Diff.UseMerger}">
|
||||
<Path Width="12" Height="12" Stretch="Uniform" Data="{StaticResource Icons.OpenWith}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue