style<Preference>: new style of preference setting dialog

This commit is contained in:
leo 2021-10-13 11:19:45 +08:00
parent e32df7d461
commit e5996d0fe1
5 changed files with 314 additions and 310 deletions

View file

@ -45,7 +45,7 @@ namespace SourceGit.Commands {
private Timer timer = null; private Timer timer = null;
public static void Start(string repo) { public static void Start(string repo) {
if (!Models.Preference.Instance.General.AutoFetchRemotes) return; if (!Models.Preference.Instance.Git.AutoFetchRemotes) return;
// 只自动更新加入管理列表中的仓库(子模块等不自动更新) // 只自动更新加入管理列表中的仓库(子模块等不自动更新)
var exists = Models.Preference.Instance.FindRepository(repo); var exists = Models.Preference.Instance.FindRepository(repo);

View file

@ -68,11 +68,6 @@ namespace SourceGit.Models {
/// </summary> /// </summary>
public int LastCheckDay { get; set; } = 0; public int LastCheckDay { get; set; } = 0;
/// <summary>
/// 启用自动拉取远程变更每10分钟一次
/// </summary>
public bool AutoFetchRemotes { get; set; } = true;
/// <summary> /// <summary>
/// 是否启用崩溃上报 /// 是否启用崩溃上报
/// </summary> /// </summary>
@ -98,6 +93,11 @@ namespace SourceGit.Models {
/// 默认克隆路径 /// 默认克隆路径
/// </summary> /// </summary>
public string DefaultCloneDir { get; set; } public string DefaultCloneDir { get; set; }
/// <summary>
/// 启用自动拉取远程变更每10分钟一次
/// </summary>
public bool AutoFetchRemotes { get; set; } = true;
} }
/// <summary> /// <summary>

View file

@ -359,18 +359,17 @@
<sys:String x:Key="Text.Revert.CommitChanges">Commit revert changes</sys:String> <sys:String x:Key="Text.Revert.CommitChanges">Commit revert changes</sys:String>
<sys:String x:Key="Text.Preference">Preference</sys:String> <sys:String x:Key="Text.Preference">Preference</sys:String>
<sys:String x:Key="Text.Preference.General">GENERAL SETTING</sys:String> <sys:String x:Key="Text.Preference.General">GENERAL</sys:String>
<sys:String x:Key="Text.Preference.Locale">Language</sys:String> <sys:String x:Key="Text.Preference.Locale">Language</sys:String>
<sys:String x:Key="Text.Preference.FontFamilyWindow">Window Font</sys:String> <sys:String x:Key="Text.Preference.FontFamilyWindow">Window Font</sys:String>
<sys:String x:Key="Text.Preference.FontFamilyContent">Content Font</sys:String> <sys:String x:Key="Text.Preference.FontFamilyContent">Content Font</sys:String>
<sys:String x:Key="Text.Preference.AvatarServer">Avatar Server</sys:String> <sys:String x:Key="Text.Preference.AvatarServer">Avatar Server</sys:String>
<sys:String x:Key="Text.Preference.CheckUpdate">Check for update</sys:String> <sys:String x:Key="Text.Preference.CheckUpdate">Check for update</sys:String>
<sys:String x:Key="Text.Preference.UseDarkTheme">Use dark theme</sys:String> <sys:String x:Key="Text.Preference.UseDarkTheme">Use dark theme</sys:String>
<sys:String x:Key="Text.Preference.AutoFetch">Fetch remotes automatically (need restart)</sys:String>
<sys:String x:Key="Text.Preference.RestoreTabs">Restore windows</sys:String> <sys:String x:Key="Text.Preference.RestoreTabs">Restore windows</sys:String>
<sys:String x:Key="Text.Preference.EnableCrashReport">Enable crash report (maybe include related path)</sys:String> <sys:String x:Key="Text.Preference.EnableCrashReport">Enable crash report (maybe include related path)</sys:String>
<sys:String x:Key="Text.Preference.UseWindowsTerminal">Use Windows Terminal instead of cmd.exe</sys:String> <sys:String x:Key="Text.Preference.UseWindowsTerminal">Use Windows Terminal instead of cmd.exe</sys:String>
<sys:String x:Key="Text.Preference.Git">GIT SETTING</sys:String> <sys:String x:Key="Text.Preference.Git">GIT</sys:String>
<sys:String x:Key="Text.Preference.Git.Path">Install Path</sys:String> <sys:String x:Key="Text.Preference.Git.Path">Install Path</sys:String>
<sys:String x:Key="Text.Preference.Git.Path.Placeholder">Input path for git.exe</sys:String> <sys:String x:Key="Text.Preference.Git.Path.Placeholder">Input path for git.exe</sys:String>
<sys:String x:Key="Text.Preference.Git.Version">Git version</sys:String> <sys:String x:Key="Text.Preference.Git.Version">Git version</sys:String>
@ -381,7 +380,8 @@
<sys:String x:Key="Text.Preference.Git.Email">User Email</sys:String> <sys:String x:Key="Text.Preference.Git.Email">User Email</sys:String>
<sys:String x:Key="Text.Preference.Git.Email.Placeholder">Global git user email</sys:String> <sys:String x:Key="Text.Preference.Git.Email.Placeholder">Global git user email</sys:String>
<sys:String x:Key="Text.Preference.Git.CRLF">Enable Auto CRLF</sys:String> <sys:String x:Key="Text.Preference.Git.CRLF">Enable Auto CRLF</sys:String>
<sys:String x:Key="Text.Preference.Merger">MERGE TOOL</sys:String> <sys:String x:Key="Text.Preference.Git.AutoFetch">Fetch remotes automatically (need restart)</sys:String>
<sys:String x:Key="Text.Preference.Merger">MERGE</sys:String>
<sys:String x:Key="Text.Preference.Merger.Type">Merger</sys:String> <sys:String x:Key="Text.Preference.Merger.Type">Merger</sys:String>
<sys:String x:Key="Text.Preference.Merger.Path">Install Path</sys:String> <sys:String x:Key="Text.Preference.Merger.Path">Install Path</sys:String>
<sys:String x:Key="Text.Preference.Merger.Path.Placeholder">Input path for merge tool</sys:String> <sys:String x:Key="Text.Preference.Merger.Path.Placeholder">Input path for merge tool</sys:String>

View file

@ -365,7 +365,6 @@
<sys:String x:Key="Text.Preference.AvatarServer">头像服务</sys:String> <sys:String x:Key="Text.Preference.AvatarServer">头像服务</sys:String>
<sys:String x:Key="Text.Preference.CheckUpdate">启用检测更新</sys:String> <sys:String x:Key="Text.Preference.CheckUpdate">启用检测更新</sys:String>
<sys:String x:Key="Text.Preference.UseDarkTheme">启用暗色主题</sys:String> <sys:String x:Key="Text.Preference.UseDarkTheme">启用暗色主题</sys:String>
<sys:String x:Key="Text.Preference.AutoFetch">启用定时自动拉取远程更新(重启生效)</sys:String>
<sys:String x:Key="Text.Preference.RestoreTabs">启动时恢复上次打开的仓库</sys:String> <sys:String x:Key="Text.Preference.RestoreTabs">启动时恢复上次打开的仓库</sys:String>
<sys:String x:Key="Text.Preference.EnableCrashReport">开启崩溃上报(可能涉及上报相关路径)</sys:String> <sys:String x:Key="Text.Preference.EnableCrashReport">开启崩溃上报(可能涉及上报相关路径)</sys:String>
<sys:String x:Key="Text.Preference.UseWindowsTerminal">使用 Windows Terminal 打开 Git 终端</sys:String> <sys:String x:Key="Text.Preference.UseWindowsTerminal">使用 Windows Terminal 打开 Git 终端</sys:String>
@ -380,6 +379,7 @@
<sys:String x:Key="Text.Preference.Git.Email">邮箱</sys:String> <sys:String x:Key="Text.Preference.Git.Email">邮箱</sys:String>
<sys:String x:Key="Text.Preference.Git.Email.Placeholder">默认GIT用户邮箱</sys:String> <sys:String x:Key="Text.Preference.Git.Email.Placeholder">默认GIT用户邮箱</sys:String>
<sys:String x:Key="Text.Preference.Git.CRLF">自动换行转换</sys:String> <sys:String x:Key="Text.Preference.Git.CRLF">自动换行转换</sys:String>
<sys:String x:Key="Text.Preference.Git.AutoFetch">启用定时自动拉取远程更新(重启生效)</sys:String>
<sys:String x:Key="Text.Preference.Merger">外部合并工具</sys:String> <sys:String x:Key="Text.Preference.Merger">外部合并工具</sys:String>
<sys:String x:Key="Text.Preference.Merger.Type">工具</sys:String> <sys:String x:Key="Text.Preference.Merger.Type">工具</sys:String>
<sys:String x:Key="Text.Preference.Merger.Path">安装路径</sys:String> <sys:String x:Key="Text.Preference.Merger.Path">安装路径</sys:String>

View file

@ -12,7 +12,7 @@
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
ResizeMode="NoResize" ResizeMode="NoResize"
Title="{DynamicResource Text.Preference}" Title="{DynamicResource Text.Preference}"
Width="500" SizeToContent="Height"> Width="500" Height="340">
<Grid> <Grid>
<Grid.Resources> <Grid.Resources>
<converters:FontFamiliesToName x:Key="FontFamiliesToName"/> <converters:FontFamiliesToName x:Key="FontFamiliesToName"/>
@ -53,10 +53,12 @@
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Fill="{DynamicResource Brush.Border0}"/> Fill="{DynamicResource Brush.Border0}"/>
<!-- Body --> <!-- Tabs -->
<Grid Grid.Row="2" Margin="16,8"> <TabControl Grid.Row="2" Margin="0,4">
<!-- General Setting -->
<TabItem Header="{DynamicResource Text.Preference.General}">
<Grid Margin="0,8">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="36"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
@ -67,19 +69,6 @@
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="8"/>
<RowDefinition Height="36"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="8"/>
<RowDefinition Height="36"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="6"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -87,21 +76,14 @@
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- General Group -->
<TextBlock
Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="{DynamicResource Text.Preference.General}"
FontSize="16" FontWeight="DemiBold"
Foreground="{DynamicResource Brush.FG2}"/>
<!-- Language --> <!-- Language -->
<TextBlock <TextBlock
Grid.Row="1" Grid.Column="0" Grid.Row="0" Grid.Column="0"
Text="{DynamicResource Text.Preference.Locale}" Text="{DynamicResource Text.Preference.Locale}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<ComboBox <ComboBox
Grid.Row="1" Grid.Column="1" Grid.Row="0" Grid.Column="1"
Height="24" Height="24"
ItemsSource="{Binding Source={x:Static models:Locale.Supported}}" ItemsSource="{Binding Source={x:Static models:Locale.Supported}}"
DisplayMemberPath="Name" DisplayMemberPath="Name"
@ -111,12 +93,12 @@
<!-- System Font --> <!-- System Font -->
<TextBlock <TextBlock
Grid.Row="2" Grid.Column="0" Grid.Row="1" Grid.Column="0"
Text="{DynamicResource Text.Preference.FontFamilyWindow}" Text="{DynamicResource Text.Preference.FontFamilyWindow}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,6,0"/> Margin="0,0,6,0"/>
<ComboBox <ComboBox
Grid.Row="2" Grid.Column="1" Grid.Row="1" Grid.Column="1"
Height="24" Height="24"
ItemsSource="{Binding Source={x:Static models:InstalledFont.GetFonts}}" ItemsSource="{Binding Source={x:Static models:InstalledFont.GetFonts}}"
SelectedValue="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyWindow, Mode=TwoWay, Converter={StaticResource FontFamiliesToName}}" SelectedValue="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyWindow, Mode=TwoWay, Converter={StaticResource FontFamiliesToName}}"
@ -133,12 +115,12 @@
<!-- Content Font --> <!-- Content Font -->
<TextBlock <TextBlock
Grid.Row="3" Grid.Column="0" Grid.Row="2" Grid.Column="0"
Text="{DynamicResource Text.Preference.FontFamilyContent}" Text="{DynamicResource Text.Preference.FontFamilyContent}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,6,0"/> Margin="0,0,6,0"/>
<ComboBox <ComboBox
Grid.Row="3" Grid.Column="1" Grid.Row="2" Grid.Column="1"
Height="24" Height="24"
ItemsSource="{Binding Source={x:Static models:InstalledFont.GetFonts}}" ItemsSource="{Binding Source={x:Static models:InstalledFont.GetFonts}}"
SelectedValue="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=TwoWay, Converter={StaticResource FontFamiliesToName}}" SelectedValue="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=TwoWay, Converter={StaticResource FontFamiliesToName}}"
@ -155,12 +137,12 @@
<!-- Avatar --> <!-- Avatar -->
<TextBlock <TextBlock
Grid.Row="4" Grid.Column="0" Grid.Row="3" Grid.Column="0"
Text="{DynamicResource Text.Preference.AvatarServer}" Text="{DynamicResource Text.Preference.AvatarServer}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<ComboBox <ComboBox
Grid.Row="4" Grid.Column="1" Grid.Row="3" Grid.Column="1"
Height="24" Height="24"
ItemsSource="{Binding Source={x:Static models:AvatarServer.Supported}}" ItemsSource="{Binding Source={x:Static models:AvatarServer.Supported}}"
DisplayMemberPath="Name" DisplayMemberPath="Name"
@ -169,56 +151,63 @@
<!-- Enable Check For Update --> <!-- Enable Check For Update -->
<CheckBox <CheckBox
Grid.Row="5" Grid.Column="1" Grid.Row="4" Grid.Column="1"
Content="{DynamicResource Text.Preference.CheckUpdate}" Content="{DynamicResource Text.Preference.CheckUpdate}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.CheckForUpdate, Mode=TwoWay}"/> IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.CheckForUpdate, Mode=TwoWay}"/>
<!-- Enable Dark Theme --> <!-- Enable Dark Theme -->
<CheckBox <CheckBox
Grid.Row="6" Grid.Column="1" Grid.Row="5" Grid.Column="1"
Content="{DynamicResource Text.Preference.UseDarkTheme}" Content="{DynamicResource Text.Preference.UseDarkTheme}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.UseDarkTheme, Mode=TwoWay}" IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.UseDarkTheme, Mode=TwoWay}"
Checked="ChangeTheme" Unchecked="ChangeTheme"/> Checked="ChangeTheme" Unchecked="ChangeTheme"/>
<!-- Auto Fetch -->
<CheckBox
Grid.Row="7" Grid.Column="1"
Content="{DynamicResource Text.Preference.AutoFetch}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.AutoFetchRemotes, Mode=TwoWay}"/>
<!-- Restore Windows --> <!-- Restore Windows -->
<CheckBox <CheckBox
Grid.Row="8" Grid.Column="1" Grid.Row="6" Grid.Column="1"
Content="{DynamicResource Text.Preference.RestoreTabs}" Content="{DynamicResource Text.Preference.RestoreTabs}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Restore.IsEnabled, Mode=TwoWay}"/> IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Restore.IsEnabled, Mode=TwoWay}"/>
<!-- Crash Report --> <!-- Crash Report -->
<CheckBox <CheckBox
Grid.Row="9" Grid.Column="1" Grid.Row="7" Grid.Column="1"
Content="{DynamicResource Text.Preference.EnableCrashReport}" Content="{DynamicResource Text.Preference.EnableCrashReport}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.EnableCrashReport, Mode=TwoWay}"/> IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.EnableCrashReport, Mode=TwoWay}"/>
<!-- Use Windows Terminal --> <!-- Use Windows Terminal -->
<CheckBox <CheckBox
Grid.Row="10" Grid.Column="1" Grid.Row="8" Grid.Column="1"
Content="{DynamicResource Text.Preference.UseWindowsTerminal}" Content="{DynamicResource Text.Preference.UseWindowsTerminal}"
IsEnabled="{Binding ElementName=me, Path=HasWindowsTerminal}" IsEnabled="{Binding ElementName=me, Path=HasWindowsTerminal}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.UseWindowsTerminal, Mode=TwoWay}"/> IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=General.UseWindowsTerminal, Mode=TwoWay}"/>
</Grid>
</TabItem>
<!-- Git Group --> <!-- Git Setting -->
<TextBlock <TabItem Header="{DynamicResource Text.Preference.Git}">
Grid.Row="12" Grid.Column="0" Grid.ColumnSpan="2" <Grid Margin="0,8">
Text="{DynamicResource Text.Preference.Git}" <Grid.RowDefinitions>
FontSize="16" FontWeight="DemiBold" <RowDefinition Height="28"/>
Foreground="{DynamicResource Brush.FG2}"/> <RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="132"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Git Executable Path --> <!-- Git Executable Path -->
<TextBlock <TextBlock
Grid.Row="13" Grid.Column="0" Grid.Row="0" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.Path}" Text="{DynamicResource Text.Preference.Git.Path}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<Grid Grid.Row="13" Grid.Column="1"> <Grid Grid.Row="0" Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@ -241,22 +230,22 @@
<!-- Git Version --> <!-- Git Version -->
<TextBlock <TextBlock
Grid.Row="14" Grid.Column="0" Grid.Row="1" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.Version}" Text="{DynamicResource Text.Preference.Git.Version}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<TextBlock <TextBlock
Grid.Row="14" Grid.Column="1" Grid.Row="1" Grid.Column="1"
x:Name="textGitVersion" x:Name="textGitVersion"
Text="{Binding ElementName=me, Path=Version}"/> Text="{Binding ElementName=me, Path=Version}"/>
<!-- Default Clone Dir --> <!-- Default Clone Dir -->
<TextBlock <TextBlock
Grid.Row="15" Grid.Column="0" Grid.Row="2" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.Dir}" Text="{DynamicResource Text.Preference.Git.Dir}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<Grid Grid.Row="15" Grid.Column="1"> <Grid Grid.Row="2" Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@ -279,12 +268,12 @@
<!-- User --> <!-- User -->
<TextBlock <TextBlock
Grid.Row="16" Grid.Column="0" Grid.Row="3" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.User}" Text="{DynamicResource Text.Preference.Git.User}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<controls:TextEdit <controls:TextEdit
Grid.Row="16" Grid.Column="1" Grid.Row="3" Grid.Column="1"
x:Name="editGitUser" x:Name="editGitUser"
Height="24" Height="24"
Text="{Binding ElementName=me, Path=User, Mode=TwoWay}" Text="{Binding ElementName=me, Path=User, Mode=TwoWay}"
@ -292,12 +281,12 @@
<!-- Email --> <!-- Email -->
<TextBlock <TextBlock
Grid.Row="17" Grid.Column="0" Grid.Row="4" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.Email}" Text="{DynamicResource Text.Preference.Git.Email}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<controls:TextEdit <controls:TextEdit
Grid.Row="17" Grid.Column="1" Grid.Row="4" Grid.Column="1"
x:Name="editGitEmail" x:Name="editGitEmail"
Height="24" Height="24"
Text="{Binding ElementName=me, Path=Email, Mode=TwoWay}" Text="{Binding ElementName=me, Path=Email, Mode=TwoWay}"
@ -305,12 +294,12 @@
<!-- CRLF --> <!-- CRLF -->
<TextBlock <TextBlock
Grid.Row="18" Grid.Column="0" Grid.Row="5" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.CRLF}" Text="{DynamicResource Text.Preference.Git.CRLF}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<ComboBox <ComboBox
Grid.Row="18" Grid.Column="1" Grid.Row="5" Grid.Column="1"
x:Name="editGitCrlf" x:Name="editGitCrlf"
Height="24" Height="24"
ItemsSource="{Binding Source={x:Static models:CRLFOption.Supported}}" ItemsSource="{Binding Source={x:Static models:CRLFOption.Supported}}"
@ -326,21 +315,34 @@
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
</ComboBox> </ComboBox>
<!-- Merge Tool Group --> <!-- Auto Fetch -->
<TextBlock <CheckBox
Grid.Row="20" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6" Grid.Column="1"
Text="{DynamicResource Text.Preference.Merger}" Content="{DynamicResource Text.Preference.Git.AutoFetch}"
FontSize="17" FontWeight="DemiBold" IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Git.AutoFetchRemotes, Mode=TwoWay}"/>
Foreground="{DynamicResource Brush.FG2}"/> </Grid>
</TabItem>
<TabItem Header="{DynamicResource Text.Preference.Merger}">
<Grid Margin="0,8">
<Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="132"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Merge Tool Type --> <!-- Merge Tool Type -->
<TextBlock <TextBlock
Grid.Row="21" Grid.Column="0" Grid.Row="0" Grid.Column="0"
Text="{DynamicResource Text.Preference.Merger.Type}" Text="{DynamicResource Text.Preference.Merger.Type}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<ComboBox <ComboBox
Grid.Row="21" Grid.Column="1" Grid.Row="0" Grid.Column="1"
Height="24" Height="24"
ItemsSource="{Binding Source={x:Static models:MergeTool.Supported}}" ItemsSource="{Binding Source={x:Static models:MergeTool.Supported}}"
DisplayMemberPath="Name" DisplayMemberPath="Name"
@ -350,11 +352,11 @@
<!-- Merge Tool Executable Path --> <!-- Merge Tool Executable Path -->
<TextBlock <TextBlock
Grid.Row="22" Grid.Column="0" Grid.Row="1" Grid.Column="0"
Text="{DynamicResource Text.Preference.Merger.Path}" Text="{DynamicResource Text.Preference.Merger.Path}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,8,0"/> Margin="0,0,8,0"/>
<Grid Grid.Row="22" Grid.Column="1"> <Grid Grid.Row="1" Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@ -375,5 +377,7 @@
Icon="{StaticResource Icon.Folder.Open}"/> Icon="{StaticResource Icon.Folder.Open}"/>
</Grid> </Grid>
</Grid> </Grid>
</TabItem>
</TabControl>
</Grid> </Grid>
</controls:Window> </controls:Window>