2024-02-05 23:08:37 -08:00
|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2024-02-22 19:39:05 -08:00
|
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
2024-02-05 23:08:37 -08:00
|
|
|
xmlns:m="using:SourceGit.Models"
|
|
|
|
xmlns:c="using:SourceGit.Converters"
|
2024-05-30 09:25:30 -07:00
|
|
|
xmlns:ac="using:Avalonia.Controls.Converters"
|
2024-02-05 23:08:37 -08:00
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
|
|
xmlns:v="using:SourceGit.Views"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.Preference"
|
|
|
|
x:DataType="vm:Preference"
|
|
|
|
x:Name="me"
|
2024-02-21 22:51:31 -08:00
|
|
|
Icon="/App.ico"
|
2024-02-05 23:08:37 -08:00
|
|
|
Title="{DynamicResource Text.Preference}"
|
2024-03-14 03:23:36 -07:00
|
|
|
Background="Transparent"
|
2024-02-05 23:08:37 -08:00
|
|
|
Width="600" SizeToContent="Height"
|
|
|
|
CanResize="False"
|
|
|
|
WindowStartupLocation="CenterScreen"
|
2024-03-14 03:23:36 -07:00
|
|
|
ExtendClientAreaToDecorationsHint="True"
|
|
|
|
ExtendClientAreaChromeHints="NoChrome"
|
|
|
|
SystemDecorations="{OnPlatform Full, Linux=None}">
|
2024-03-14 03:29:19 -07:00
|
|
|
<Grid RowDefinitions="Auto,Auto" Margin="{OnPlatform 0, Linux=6}">
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- Custom window shadow for Linux -->
|
|
|
|
<Border Grid.Row="0" Grid.RowSpan="2"
|
|
|
|
Background="{DynamicResource Brush.Window}"
|
|
|
|
Effect="drop-shadow(0 0 6 #A0000000)"
|
|
|
|
IsVisible="{OnPlatform False, Linux=True}"/>
|
|
|
|
|
|
|
|
<!-- TitleBar -->
|
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Height="30">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
|
|
|
Background="{DynamicResource Brush.TitleBar}"
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
2024-03-14 03:23:36 -07:00
|
|
|
PointerPressed="BeginMoveWindow"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<Path Grid.Column="0"
|
|
|
|
Width="14" Height="14"
|
|
|
|
Data="{StaticResource Icons.Settings2}"
|
|
|
|
Margin="10,0,0,0"
|
2024-03-14 03:23:36 -07:00
|
|
|
IsVisible="{OnPlatform True, macOS=False}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-07 19:13:53 -08:00
|
|
|
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{OnPlatform False, macOS=True}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Button Classes="caption_button_macos" Click="CloseWindow">
|
|
|
|
<Grid>
|
|
|
|
<Ellipse Fill="{DynamicResource Brush.MacOS.Close}"/>
|
2024-02-18 23:30:10 -08:00
|
|
|
<Path Height="6" Width="6" Stretch="Fill" Fill="#404040" Stroke="#404040" StrokeThickness="1" Data="{StaticResource Icons.Window.Close}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.ColumnSpan="3"
|
|
|
|
Classes="bold"
|
|
|
|
Text="{DynamicResource Text.Preference}"
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
IsHitTestVisible="False"/>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<Button Grid.Column="2" Classes="caption_button" Click="CloseWindow" IsVisible="{OnPlatform True, macOS=False}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Path Data="{StaticResource Icons.Window.Close}"/>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- Body -->
|
|
|
|
<Border Grid.Row="1" Background="{DynamicResource Brush.Window}">
|
|
|
|
<TabControl>
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.General}"/>
|
|
|
|
</TabItem.Header>
|
2024-03-26 07:11:06 -07:00
|
|
|
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32" ColumnDefinitions="Auto,*">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.General.Locale}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding Source={x:Static m:Locale.Supported}}"
|
|
|
|
DisplayMemberBinding="{Binding Name, x:DataType=m:Locale}"
|
|
|
|
SelectedItem="{Binding Locale, Mode=TwoWay, Converter={x:Static c:StringConverters.ToLocale}}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.General.AvatarServer}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="1" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
SelectedItem="{Binding AvatarServer, Mode=TwoWay}">
|
|
|
|
<ComboBox.Items>
|
|
|
|
<sys:String>https://www.gravatar.com/avatar/</sys:String>
|
|
|
|
<sys:String>https://cravatar.cn/avatar/</sys:String>
|
|
|
|
</ComboBox.Items>
|
|
|
|
</ComboBox>
|
2024-02-22 19:39:05 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
2024-03-21 21:29:40 -07:00
|
|
|
Text="{DynamicResource Text.Preference.General.MaxHistoryCommits}"
|
2024-03-14 03:23:36 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-03-21 21:29:40 -07:00
|
|
|
<Grid Grid.Row="2" Grid.Column="1" ColumnDefinitions="*,64">
|
|
|
|
<Slider Grid.Column="0"
|
|
|
|
Minimum="20000" Maximum="100000"
|
|
|
|
TickPlacement="BottomRight" TickFrequency="5000"
|
|
|
|
IsSnapToTickEnabled="True"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Foreground="{DynamicResource Brush.Border1}"
|
|
|
|
Value="{Binding MaxHistoryCommits, Mode=TwoWay}">
|
|
|
|
<Slider.Resources>
|
|
|
|
<Thickness x:Key="SliderTopHeaderMargin">0,0,0,4</Thickness>
|
|
|
|
<GridLength x:Key="SliderPreContentMargin">0</GridLength>
|
|
|
|
<GridLength x:Key="SliderPostContentMargin">0</GridLength>
|
|
|
|
<CornerRadius x:Key="SliderThumbCornerRadius">8</CornerRadius>
|
|
|
|
<x:Double x:Key="SliderHorizontalThumbWidth">16</x:Double>
|
|
|
|
<x:Double x:Key="SliderHorizontalThumbHeight">16</x:Double>
|
|
|
|
</Slider.Resources>
|
|
|
|
</Slider>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="1"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
Foreground="{DynamicResource Brush.FG1}"
|
|
|
|
Text="{Binding MaxHistoryCommits}"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<CheckBox Grid.Row="3" Grid.Column="1"
|
|
|
|
Content="{DynamicResource Text.Preference.General.RestoreTabs}"
|
|
|
|
IsChecked="{Binding RestoreTabs, Mode=TwoWay}"/>
|
|
|
|
|
|
|
|
<CheckBox Grid.Row="4" Grid.Column="1"
|
|
|
|
Height="32"
|
|
|
|
Content="{DynamicResource Text.Preference.General.UseFixedTabWidth}"
|
|
|
|
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth, Mode=TwoWay}"/>
|
2024-03-26 07:11:06 -07:00
|
|
|
|
|
|
|
<CheckBox Grid.Row="5" Grid.Column="1"
|
|
|
|
Height="32"
|
|
|
|
Content="{DynamicResource Text.Preference.General.Check4UpdatesOnStartup}"
|
|
|
|
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=Check4UpdatesOnStartup, Mode=TwoWay}"/>
|
2024-03-21 21:29:40 -07:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Appearance}"/>
|
|
|
|
</TabItem.Header>
|
|
|
|
<Grid Margin="8" RowDefinitions="32,32,32,32" ColumnDefinitions="Auto,*">
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Appearance.Theme}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
DisplayMemberBinding="{Binding Key, x:DataType=ThemeVariant}"
|
|
|
|
SelectedItem="{Binding Theme, Mode=TwoWay, Converter={x:Static c:StringConverters.ToTheme}}">
|
|
|
|
<ComboBox.Items>
|
|
|
|
<ThemeVariant>Default</ThemeVariant>
|
|
|
|
<ThemeVariant>Dark</ThemeVariant>
|
|
|
|
<ThemeVariant>Light</ThemeVariant>
|
|
|
|
</ComboBox.Items>
|
|
|
|
</ComboBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-21 21:29:40 -07:00
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Appearance.DefaultFont}"
|
2024-03-21 03:02:06 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-03-21 21:29:40 -07:00
|
|
|
<ComboBox Grid.Row="1" Grid.Column="1"
|
2024-03-21 03:02:06 -07:00
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding #me.InstalledFonts}"
|
2024-03-21 08:19:09 -07:00
|
|
|
SelectedItem="{Binding DefaultFont, Mode=TwoWay}">
|
2024-03-21 03:02:06 -07:00
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate DataType="FontFamily">
|
|
|
|
<Border Height="24">
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" FontFamily="{Binding}"/>
|
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
|
2024-03-21 21:29:40 -07:00
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Appearance.MonospaceFont}"
|
2024-03-21 03:02:06 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-03-21 21:29:40 -07:00
|
|
|
<ComboBox Grid.Row="2" Grid.Column="1"
|
2024-03-21 03:02:06 -07:00
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding #me.InstalledMonospaceFonts}"
|
2024-03-21 08:19:09 -07:00
|
|
|
SelectedItem="{Binding MonospaceFont, Mode=TwoWay}">
|
2024-03-21 03:02:06 -07:00
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate DataType="FontFamily">
|
|
|
|
<Border Height="24">
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" FontFamily="{Binding}"/>
|
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
|
2024-03-21 21:29:40 -07:00
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Appearance.DefaultFontSize}"
|
2024-03-21 21:03:04 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-03-21 21:29:40 -07:00
|
|
|
<NumericUpDown Grid.Row="3" Grid.Column="1"
|
2024-03-21 21:03:04 -07:00
|
|
|
Minimum="10" Maximum="16" Increment="0.5"
|
|
|
|
Height="28"
|
|
|
|
Padding="4"
|
2024-03-21 21:18:03 -07:00
|
|
|
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
|
2024-03-21 21:03:04 -07:00
|
|
|
CornerRadius="3"
|
|
|
|
Value="{Binding DefaultFontSize, Mode=TwoWay}">
|
|
|
|
<NumericUpDown.Styles>
|
|
|
|
<Style Selector="NumericUpDown /template/ ButtonSpinner#PART_Spinner">
|
|
|
|
<Setter Property="MinHeight" Value="0"/>
|
|
|
|
<Setter Property="Height" Value="28"/>
|
|
|
|
</Style>
|
|
|
|
<Style Selector="NumericUpDown /template/ TextBox#PART_TextBox">
|
|
|
|
<Setter Property="MinHeight" Value="0"/>
|
|
|
|
<Setter Property="Height" Value="28"/>
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
|
<Setter Property="CornerRadius" Value="3,0,0,3"/>
|
|
|
|
</Style>
|
|
|
|
</NumericUpDown.Styles>
|
|
|
|
</NumericUpDown>
|
2024-03-14 03:23:36 -07:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Git}"/>
|
|
|
|
</TabItem.Header>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-05-11 02:52:56 -07:00
|
|
|
<Grid Margin="8" RowDefinitions="32,32,Auto,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Git.Path}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<TextBox Grid.Row="0" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding GitInstallPath, Mode=TwoWay}">
|
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectGitExecutable">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Git.Version}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-05-29 03:53:38 -07:00
|
|
|
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
|
|
|
|
<TextBlock Classes="monospace"
|
|
|
|
Margin="0,0,8,0"
|
|
|
|
Text="{Binding #me.GitVersion}"
|
|
|
|
IsVisible="{Binding #me.GitVersion, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
|
|
|
|
|
|
<Border Background="Transparent"
|
|
|
|
ToolTip.Tip="{DynamicResource Text.Preference.Git.Invalid}"
|
|
|
|
IsVisible="{Binding #me.GitVersion, Converter={x:Static c:StringConverters.UnderRecommendGitVersion}}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red"/>
|
|
|
|
</Border>
|
|
|
|
</StackPanel>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-04-08 19:41:37 -07:00
|
|
|
<Border Grid.Row="2" Grid.Column="0"
|
|
|
|
Height="32"
|
|
|
|
IsVisible="{OnPlatform False, Windows=True}">
|
|
|
|
<TextBlock Text="{DynamicResource Text.Preference.Git.Shell}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
</Border>
|
|
|
|
<ComboBox Grid.Row="2" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
HorizontalContentAlignment="Left"
|
2024-04-08 22:34:42 -07:00
|
|
|
RenderOptions.BitmapInterpolationMode="HighQuality"
|
2024-04-08 19:41:37 -07:00
|
|
|
FontSize="{Binding DefaultFontSize, Mode=OneWay}"
|
|
|
|
SelectedIndex="{Binding GitShell, Mode=TwoWay}"
|
|
|
|
IsVisible="{OnPlatform False, Windows=True}">
|
|
|
|
<ComboBox.Items>
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Image Grid.Column="0" Width="16" Height="16" Source="/Resources/ShellIcons/git-bash.png" RenderOptions.BitmapInterpolationMode="HighQuality"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="Git Bash" Margin="6,0,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Image Grid.Column="0" Width="16" Height="16" Source="/Resources/ShellIcons/pwsh.png" RenderOptions.BitmapInterpolationMode="HighQuality"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="PowerShell" Margin="6,0,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Image Grid.Column="0" Width="16" Height="16" Source="/Resources/ShellIcons/cmd.png" RenderOptions.BitmapInterpolationMode="HighQuality"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="Command Prompt" Margin="6,0,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Image Grid.Column="0" Width="16" Height="16" Source="/Resources/ShellIcons/wt.png" RenderOptions.BitmapInterpolationMode="HighQuality"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="Default Shell in Windows Terminal" Margin="6,0,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
</ComboBox.Items>
|
|
|
|
</ComboBox>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.DefaultCloneDir}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-04-08 19:41:37 -07:00
|
|
|
<TextBox Grid.Row="3" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding GitDefaultCloneDir, Mode=TwoWay}">
|
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectDefaultCloneDir">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-04-08 19:41:37 -07:00
|
|
|
<TextBlock Grid.Row="4" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.User}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-04-08 19:41:37 -07:00
|
|
|
<TextBox Grid.Row="4" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding #me.DefaultUser, Mode=TwoWay}"
|
|
|
|
Watermark="{DynamicResource Text.Preference.Git.User.Placeholder}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-04-08 19:41:37 -07:00
|
|
|
<TextBlock Grid.Row="5" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.Email}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-04-08 19:41:37 -07:00
|
|
|
<TextBox Grid.Row="5" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding #me.DefaultEmail, Mode=TwoWay}"
|
|
|
|
Watermark="{DynamicResource Text.Preference.Git.Email.Placeholder}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-04-08 19:41:37 -07:00
|
|
|
<TextBlock Grid.Row="6" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.CRLF}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-04-08 19:41:37 -07:00
|
|
|
<ComboBox Grid.Row="6" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding Source={x:Static m:CRLFMode.Supported}}"
|
|
|
|
SelectedItem="{Binding #me.CRLFMode, Mode=TwoWay}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="{x:Type m:CRLFMode}">
|
|
|
|
<Grid ColumnDefinitions="64,*">
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Name}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Desc}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-04-08 02:39:52 -07:00
|
|
|
<CheckBox Grid.Row="7" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Content="{DynamicResource Text.Preference.Git.AutoFetch}"
|
|
|
|
IsChecked="{Binding GitAutoFetch, Mode=TwoWay}"/>
|
2024-05-11 02:37:54 -07:00
|
|
|
|
|
|
|
<TextBlock Grid.Row="8" Grid.Column="0"
|
|
|
|
IsVisible="{Binding GitAutoFetch}"
|
|
|
|
Text="{DynamicResource Text.Preference.Git.AutoFetchInterval}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-05-11 02:52:56 -07:00
|
|
|
<Grid Grid.Row="8" Grid.Column="1" Height="32" ColumnDefinitions="*,Auto" IsVisible="{Binding GitAutoFetch}">
|
2024-05-11 02:37:54 -07:00
|
|
|
<NumericUpDown Grid.Column="0"
|
|
|
|
Minimum="1" Maximum="60" Increment="1"
|
|
|
|
Height="28"
|
|
|
|
Padding="4"
|
|
|
|
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
|
|
|
|
CornerRadius="3"
|
|
|
|
ParsingNumberStyle="Integer"
|
|
|
|
FormatString="0"
|
|
|
|
Value="{Binding GitAutoFetchInterval, Mode=TwoWay, FallbackValue=10}">
|
2024-05-11 02:52:56 -07:00
|
|
|
<NumericUpDown.Styles>
|
|
|
|
<Style Selector="NumericUpDown /template/ ButtonSpinner#PART_Spinner">
|
|
|
|
<Setter Property="MinHeight" Value="0"/>
|
|
|
|
<Setter Property="Height" Value="28"/>
|
|
|
|
</Style>
|
|
|
|
<Style Selector="NumericUpDown /template/ TextBox#PART_TextBox">
|
|
|
|
<Setter Property="MinHeight" Value="0"/>
|
|
|
|
<Setter Property="Height" Value="28"/>
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
|
<Setter Property="CornerRadius" Value="3,0,0,3"/>
|
|
|
|
</Style>
|
|
|
|
</NumericUpDown.Styles>
|
2024-05-11 02:37:54 -07:00
|
|
|
</NumericUpDown>
|
2024-05-11 02:52:56 -07:00
|
|
|
|
2024-05-11 02:37:54 -07:00
|
|
|
<TextBlock Grid.Column="1"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Margin="5,0,0,0"
|
2024-05-11 02:52:56 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.AutoFetchIntervalSuffix}" />
|
2024-05-11 02:37:54 -07:00
|
|
|
</Grid>
|
2024-03-14 03:23:36 -07:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.GPG}"/>
|
|
|
|
</TabItem.Header>
|
2024-05-30 09:25:30 -07:00
|
|
|
|
|
|
|
<TabItem.Resources>
|
|
|
|
<ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/>
|
|
|
|
</TabItem.Resources>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-05-30 09:25:30 -07:00
|
|
|
<Grid Margin="8" RowDefinitions="32,32,32,32,32" ColumnDefinitions="Auto,*">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
2024-05-30 09:25:30 -07:00
|
|
|
Text="{DynamicResource Text.Preference.GPG.Format}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding Source={x:Static m:GPGFormat.Supported}}"
|
|
|
|
SelectedItem="{Binding #me.GPGFormat, Mode=TwoWay, FallbackValue={x:Static m:GPGFormat.OPENPGP}}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="{x:Type m:GPGFormat}">
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Name}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Desc}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.GPG.Path}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-05-30 09:25:30 -07:00
|
|
|
<TextBox Grid.Row="1" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
2024-05-30 09:25:30 -07:00
|
|
|
Text="{Binding #me.GPGExecutableFile, Mode=TwoWay}"
|
|
|
|
IsEnabled="{Binding #me.GPGFormat, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:GPGFormat.OPENPGP}}">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectGPGExecutable">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-05-30 09:25:30 -07:00
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.GPG.UserKey}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-05-30 09:25:30 -07:00
|
|
|
<TextBox Grid.Row="2" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding #me.GPGUserKey, Mode=TwoWay}"
|
|
|
|
Watermark="{DynamicResource Text.Preference.GPG.UserKey.Placeholder}"/>
|
2024-05-23 19:31:20 -07:00
|
|
|
|
2024-05-30 09:25:30 -07:00
|
|
|
<CheckBox Grid.Row="3" Grid.Column="1"
|
|
|
|
Content="{DynamicResource Text.Preference.GPG.CommitEnabled}"
|
|
|
|
IsChecked="{Binding #me.EnableGPGCommitSigning, Mode=TwoWay}"/>
|
|
|
|
|
|
|
|
<CheckBox Grid.Row="4" Grid.Column="1"
|
|
|
|
Content="{DynamicResource Text.Preference.GPG.TagEnabled}"
|
|
|
|
IsChecked="{Binding #me.EnableGPGTagSigning, Mode=TwoWay}"/>
|
2024-03-14 03:23:36 -07:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Merger}"/>
|
|
|
|
</TabItem.Header>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<Grid Margin="8" RowDefinitions="32,32,Auto,Auto" ColumnDefinitions="Auto,*">
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Merger.Type}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
2024-04-09 00:00:52 -07:00
|
|
|
HorizontalContentAlignment="Left"
|
|
|
|
RenderOptions.BitmapInterpolationMode="HighQuality"
|
|
|
|
FontSize="{Binding DefaultFontSize}"
|
2024-04-08 19:41:37 -07:00
|
|
|
ItemsSource="{Binding Source={x:Static m:ExternalMerger.Supported}}"
|
2024-04-09 00:00:52 -07:00
|
|
|
SelectedIndex="{Binding ExternalMergeToolType, Mode=TwoWay}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="{x:Type m:ExternalMerger}">
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Image Grid.Column="0" Width="16" Height="16" Source="{Binding IconImage}" RenderOptions.BitmapInterpolationMode="HighQuality"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="6,0,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Merger.Path}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<TextBox Grid.Row="1" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding ExternalMergeToolPath, Mode=TwoWay}">
|
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectExternalMergeTool">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Merger.CustomMergeCmd}"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
Margin="0,0,16,0"
|
|
|
|
IsVisible="{Binding ExternalMergeToolType, Converter={x:Static c:IntConverters.IsZero}}"/>
|
|
|
|
<TextBox Grid.Row="2" Grid.Column="1"
|
|
|
|
Height="28" Margin="0,2"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding ExternalMergeToolCmd, Mode=TwoWay}"
|
2024-02-05 23:08:37 -08:00
|
|
|
IsVisible="{Binding ExternalMergeToolType, Converter={x:Static c:IntConverters.IsZero}}"/>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Merger.CustomDiffCmd}"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
Margin="0,0,16,0"
|
|
|
|
IsVisible="{Binding ExternalMergeToolType, Converter={x:Static c:IntConverters.IsZero}}"/>
|
|
|
|
<TextBox Grid.Row="3" Grid.Column="1"
|
|
|
|
Height="28" Margin="0,2"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding ExternalMergeToolDiffCmd, Mode=TwoWay}"
|
2024-02-05 23:08:37 -08:00
|
|
|
IsVisible="{Binding ExternalMergeToolType, Converter={x:Static c:IntConverters.IsZero}}"/>
|
2024-03-14 03:23:36 -07:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
</TabControl>
|
|
|
|
</Border>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
</Window>
|