optimize<CommitGraph>: remove unused polyline mode

This commit is contained in:
leo 2021-10-08 16:46:14 +08:00
parent ade45732f2
commit 7c44c0a840
6 changed files with 20 additions and 88 deletions

View file

@ -192,24 +192,16 @@
</Border>
<!-- Right Top Button -->
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,6,8,0" Orientation="Horizontal">
<ToggleButton
Style="{StaticResource Style.ToggleButton.CommitGraphMode}"
Foreground="{DynamicResource Brush.FG2}"
Width="16" Height="16"
ToolTip="{DynamicResource Text.Histories.GraphMode}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.UsePolylineInGraph, Mode=TwoWay}"
Checked="ChangeGraphMode" Unchecked="ChangeGraphMode"/>
<ToggleButton
Style="{StaticResource Style.ToggleButton.SplitDirection}"
Foreground="{DynamicResource Brush.FG2}"
Width="16" Height="16"
Margin="8,0,0,0"
ToolTip="{DynamicResource Text.Histories.DisplayMode}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.MoveCommitInfoRight, Mode=TwoWay, Converter={StaticResource InverseBool}}"
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
</StackPanel>
<ToggleButton
HorizontalAlignment="Right"
VerticalAlignment="Top"
Style="{StaticResource Style.ToggleButton.SplitDirection}"
Foreground="{DynamicResource Brush.FG2}"
Width="16" Height="16"
Margin="0,6,8,0"
ToolTip="{DynamicResource Text.Histories.DisplayMode}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.MoveCommitInfoRight, Mode=TwoWay, Converter={StaticResource InverseBool}}"
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
</Grid>
</Grid>
</UserControl>

View file

@ -145,11 +145,6 @@ namespace SourceGit.Views.Widgets {
layout.InvalidateArrange();
}
public void ChangeGraphMode(object sender, RoutedEventArgs e) {
graph.InvalidateVisual();
e.Handled = true;
}
#endregion
#region SEARCH_BAR

View file

@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:models="clr-namespace:SourceGit.Models"
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
@ -15,11 +16,11 @@
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="48"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="48"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="48"/>
</Grid.ColumnDefinitions>
<Border
@ -48,11 +49,11 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" x:Name="txtStartSHA" Foreground="DarkOrange"/>
<TextBlock Grid.Column="1" x:Name="txtStartTime" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
<TextBlock Grid.Column="0" x:Name="txtStartSHA" Foreground="DarkOrange" FontFamily="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=OneWay}"/>
<TextBlock Grid.Column="1" x:Name="txtStartTime" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontFamily="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=OneWay}"/>
</Grid>
<TextBlock Grid.Row="1" x:Name="txtStartSubject" FontSize="10pt" VerticalAlignment="Bottom"/>
<TextBlock Grid.Row="1" x:Name="txtStartSubject" VerticalAlignment="Bottom" FontFamily="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=OneWay}" FontSize="10pt"/>
</Grid>
</Grid>
</Border>
@ -94,11 +95,11 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" x:Name="txtEndSHA" Foreground="DarkOrange"/>
<TextBlock Grid.Column="1" x:Name="txtEndTime" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
<TextBlock Grid.Column="0" x:Name="txtEndSHA" Foreground="DarkOrange" FontFamily="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=OneWay}" />
<TextBlock Grid.Column="1" x:Name="txtEndTime" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontFamily="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=OneWay}" />
</Grid>
<TextBlock Grid.Row="1" x:Name="txtEndSubject" FontSize="10pt" VerticalAlignment="Bottom"/>
<TextBlock Grid.Row="1" x:Name="txtEndSubject" VerticalAlignment="Bottom" FontFamily="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=OneWay}" FontSize="10pt"/>
</Grid>
</Grid>
</Border>