mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
style<*>: add borders for all windows
This commit is contained in:
parent
e677a6a6a4
commit
50f51e4210
6 changed files with 316 additions and 306 deletions
|
@ -14,66 +14,68 @@
|
|||
</WindowChrome.WindowChrome>
|
||||
|
||||
<!-- Window Layout -->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Titlebar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- LOGO -->
|
||||
<Path Margin="6,0,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Info}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.About}" FontWeight="Light"/>
|
||||
|
||||
<!-- Close Button -->
|
||||
<Button Click="Quit" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.HighlightHover}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="Red"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
|
||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Background="{StaticResource Brush.Window}">
|
||||
<Border BorderBrush="{StaticResource Brush.Border3}" BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="90"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="24"/>
|
||||
<RowDefinition Height="24"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,6,0,0">
|
||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="{StaticResource Brush.Logo}"/>
|
||||
</StackPanel>
|
||||
<!-- Titlebar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="1" Content="{StaticResource Text.About.Title}" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" FontSize="18" FontWeight="Bold"/>
|
||||
<Label Grid.Row="2" x:Name="version" HorizontalContentAlignment="Center" FontSize="11"/>
|
||||
<!-- LOGO -->
|
||||
<Path Margin="6,0,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Info}"/>
|
||||
|
||||
<Label Grid.Row="3" HorizontalContentAlignment="Center" FontSize="11">
|
||||
<Hyperlink RequestNavigate="OpenSource" NavigateUri="https://gitee.com/sourcegit/SourceGit.git">
|
||||
<Run Text="https://gitee.com/sourcegit/SourceGit.git"/>
|
||||
</Hyperlink>
|
||||
</Label>
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.About}" FontWeight="Light"/>
|
||||
|
||||
<Label Grid.Row="4" Content="Copyright © sourcegit 2021. All rights reserved." HorizontalContentAlignment="Center" FontSize="11"/>
|
||||
<!-- Close Button -->
|
||||
<Button Click="Quit" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.HighlightHover}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="Red"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
|
||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Background="{StaticResource Brush.Window}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="90"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="24"/>
|
||||
<RowDefinition Height="24"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,6,0,0">
|
||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="{StaticResource Brush.Logo}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="1" Content="{StaticResource Text.About.Title}" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" FontSize="18" FontWeight="Bold"/>
|
||||
<Label Grid.Row="2" x:Name="version" HorizontalContentAlignment="Center" FontSize="11"/>
|
||||
|
||||
<Label Grid.Row="3" HorizontalContentAlignment="Center" FontSize="11">
|
||||
<Hyperlink RequestNavigate="OpenSource" NavigateUri="https://gitee.com/sourcegit/SourceGit.git">
|
||||
<Run Text="https://gitee.com/sourcegit/SourceGit.git"/>
|
||||
</Hyperlink>
|
||||
</Label>
|
||||
|
||||
<Label Grid.Row="4" Content="Copyright © sourcegit 2021. All rights reserved." HorizontalContentAlignment="Center" FontSize="11"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
|
|
|
@ -14,16 +14,18 @@
|
|||
</WindowChrome.WindowChrome>
|
||||
|
||||
<!-- Window Content -->
|
||||
<Border>
|
||||
<Border BorderBrush="{StaticResource Brush.Border3}">
|
||||
<!-- Fix Maximize BUG -->
|
||||
<Border.Style>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Maximized">
|
||||
<Setter Property="Margin" Value="6"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Normal">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
|
|
@ -15,16 +15,18 @@
|
|||
</WindowChrome.WindowChrome>
|
||||
|
||||
<!-- Layout Window -->
|
||||
<Border Background="{StaticResource Brush.Window}">
|
||||
<Border Background="{StaticResource Brush.Window}" BorderBrush="{StaticResource Brush.Border3}">
|
||||
<!-- Fix Maximize BUG -->
|
||||
<Border.Style>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Maximized">
|
||||
<Setter Property="Margin" Value="6"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Normal">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
@ -103,9 +105,9 @@
|
|||
|
||||
<DataGrid
|
||||
x:Name="commitList"
|
||||
Margin="2,0,0,0"
|
||||
Margin="0,0,0,0"
|
||||
Grid.Column="0"
|
||||
Background="{StaticResource Brush.Contents}"
|
||||
Background="{StaticResource Brush.Window}"
|
||||
BorderThickness="0"
|
||||
SelectionMode="Single"
|
||||
SelectionChanged="CommitSelectionChanged">
|
||||
|
@ -114,7 +116,7 @@
|
|||
<DataGridTemplateColumn Width="*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource Brush.Border3}" BorderThickness="0,0,0,1" Padding="4">
|
||||
<Border BorderBrush="{StaticResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
|
||||
<StackPanel Orientation="Vertical" Margin="2" MaxWidth="290">
|
||||
<Grid TextBlock.FontSize="11" TextBlock.Foreground="{StaticResource Brush.FG2}">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</WindowChrome.WindowChrome>
|
||||
|
||||
<!-- Window Layout -->
|
||||
<Border Background="{StaticResource Brush.Window}">
|
||||
<Border Background="{StaticResource Brush.Window}" BorderThickness="1" BorderBrush="{StaticResource Brush.Border3}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
|
|
|
@ -18,190 +18,192 @@
|
|||
</WindowChrome.WindowChrome>
|
||||
|
||||
<!-- Window Layout -->
|
||||
<Grid Background="{StaticResource Brush.Window}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Titlebar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- LOGO -->
|
||||
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="{StaticResource Brush.Logo}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.Preference}" FontWeight="Light"/>
|
||||
|
||||
<!-- Close Button -->
|
||||
<Button Click="Close" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.HighlightHover}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="Red"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
|
||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<!-- Content -->
|
||||
<Grid Grid.Row="1" Margin="16,8">
|
||||
<Border BorderBrush="{StaticResource Brush.Border3}" BorderThickness="1">
|
||||
<Grid Background="{StaticResource Brush.Window}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="18"/>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="18"/>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="18"/>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="136"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 通用 -->
|
||||
<StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Horizontal">
|
||||
<Label Content="{StaticResource Text.Preference.General}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Content="{StaticResource Text.Preference.RestartRequired}" Opacity=".5"/>
|
||||
</StackPanel>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{StaticResource Text.Preference.Locale}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
x:Name="cmbLang"
|
||||
Height="24"
|
||||
Width="120"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalContentAlignment="Center"
|
||||
DisplayMemberPath="Desc"
|
||||
SelectionChanged="ChangeLanguage"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.Preference.UseLight}" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=UI.UseLightTheme, Mode=TwoWay}"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{StaticResource Text.Preference.CheckUpdate}" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=CheckUpdate, Mode=TwoWay}"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
|
||||
<!-- GIT相关配置 -->
|
||||
<Label Grid.Row="5" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Git}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="{StaticResource Text.Preference.Git.Path}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="6" Grid.Column="1">
|
||||
<!-- Titlebar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Grid.Column="0"
|
||||
x:Name="txtGitPath"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.GitExecutable, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Git.Path.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectGitPath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="{StaticResource Text.Preference.Git.Dir}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="7" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- LOGO -->
|
||||
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="{StaticResource Brush.Logo}"/>
|
||||
|
||||
<TextBox Grid.Column="0"
|
||||
x:Name="txtGitCloneDir"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.GitDefaultCloneDir, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Git.Dir.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectDefaultClonePath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.Preference}" FontWeight="Light"/>
|
||||
|
||||
<!-- Close Button -->
|
||||
<Button Click="Close" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.HighlightHover}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="Red"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
|
||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<!-- Global User -->
|
||||
<Label Grid.Row="9" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Global}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="10" Grid.Column="0" Content="{StaticResource Text.Preference.User}" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user name" Text="{Binding ElementName=me, Path=GlobalUser, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="11" Grid.Column="0" Content="{StaticResource Text.Preference.Email}" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="11" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user email" Text="{Binding ElementName=me, Path=GlobalUserEmail, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="12" Grid.Column="0" Content="{StaticResource Text.Preference.CRLF}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="12" Grid.Column="1"
|
||||
x:Name="cmbAutoCRLF"
|
||||
Height="24"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center"
|
||||
SelectionChanged="AutoCRLFSelectionChanged">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" Height="20">
|
||||
<Label Content="{Binding Value}" Padding="0" VerticalContentAlignment="Center"/>
|
||||
<Label Content="{Binding Desc}" Foreground="{StaticResource Brush.FG2}" FontSize="10" Margin="8,0,0,0" Padding="0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<!-- Content -->
|
||||
<Grid Grid.Row="1" Margin="16,8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="18"/>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="18"/>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="18"/>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 合并工具配置 -->
|
||||
<Label Grid.Row="14" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Merger}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="15" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Type}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="15" Grid.Column="1"
|
||||
Height="24"
|
||||
Padding="2,0,0,0"
|
||||
HorizontalContentAlignment="Left"
|
||||
VerticalContentAlignment="Center"
|
||||
SelectedIndex="{Binding Source={x:Static app:App.Setting}, Path=Tools.MergeTool, Mode=TwoWay}"
|
||||
ItemsSource="{Binding Source={x:Static git:MergeTool.Supported}}"
|
||||
DisplayMemberPath="Name"
|
||||
SelectionChanged="ChangeMergeTool"/>
|
||||
<Label Grid.Row="16" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Path}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="16" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="136"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Grid.Column="0"
|
||||
x:Name="txtMergePath"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.MergeExecutable, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Merger.Path.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectMergeToolPath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
</Button>
|
||||
<!-- 通用 -->
|
||||
<StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Horizontal">
|
||||
<Label Content="{StaticResource Text.Preference.General}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Content="{StaticResource Text.Preference.RestartRequired}" Opacity=".5"/>
|
||||
</StackPanel>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{StaticResource Text.Preference.Locale}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
x:Name="cmbLang"
|
||||
Height="24"
|
||||
Width="120"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalContentAlignment="Center"
|
||||
DisplayMemberPath="Desc"
|
||||
SelectionChanged="ChangeLanguage"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.Preference.UseLight}" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=UI.UseLightTheme, Mode=TwoWay}"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{StaticResource Text.Preference.CheckUpdate}" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=CheckUpdate, Mode=TwoWay}"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
|
||||
<!-- GIT相关配置 -->
|
||||
<Label Grid.Row="5" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Git}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="{StaticResource Text.Preference.Git.Path}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="6" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Grid.Column="0"
|
||||
x:Name="txtGitPath"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.GitExecutable, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Git.Path.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectGitPath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="{StaticResource Text.Preference.Git.Dir}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="7" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Grid.Column="0"
|
||||
x:Name="txtGitCloneDir"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.GitDefaultCloneDir, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Git.Dir.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectDefaultClonePath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<!-- Global User -->
|
||||
<Label Grid.Row="9" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Global}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="10" Grid.Column="0" Content="{StaticResource Text.Preference.User}" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user name" Text="{Binding ElementName=me, Path=GlobalUser, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="11" Grid.Column="0" Content="{StaticResource Text.Preference.Email}" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="11" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user email" Text="{Binding ElementName=me, Path=GlobalUserEmail, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="12" Grid.Column="0" Content="{StaticResource Text.Preference.CRLF}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="12" Grid.Column="1"
|
||||
x:Name="cmbAutoCRLF"
|
||||
Height="24"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center"
|
||||
SelectionChanged="AutoCRLFSelectionChanged">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" Height="20">
|
||||
<Label Content="{Binding Value}" Padding="0" VerticalContentAlignment="Center"/>
|
||||
<Label Content="{Binding Desc}" Foreground="{StaticResource Brush.FG2}" FontSize="10" Margin="8,0,0,0" Padding="0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!-- 合并工具配置 -->
|
||||
<Label Grid.Row="14" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Merger}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="15" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Type}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="15" Grid.Column="1"
|
||||
Height="24"
|
||||
Padding="2,0,0,0"
|
||||
HorizontalContentAlignment="Left"
|
||||
VerticalContentAlignment="Center"
|
||||
SelectedIndex="{Binding Source={x:Static app:App.Setting}, Path=Tools.MergeTool, Mode=TwoWay}"
|
||||
ItemsSource="{Binding Source={x:Static git:MergeTool.Supported}}"
|
||||
DisplayMemberPath="Name"
|
||||
SelectionChanged="ChangeMergeTool"/>
|
||||
<Label Grid.Row="16" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Path}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="16" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Grid.Column="0"
|
||||
x:Name="txtMergePath"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.MergeExecutable, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Merger.Path.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectMergeToolPath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Label Grid.Row="17" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Cmd}" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Row="17" Grid.Column="1"
|
||||
x:Name="txtMergeParam"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{StaticResource Brush.FG2}"/>
|
||||
</Grid>
|
||||
<Label Grid.Row="17" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Cmd}" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Row="17" Grid.Column="1"
|
||||
x:Name="txtMergeParam"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{StaticResource Brush.FG2}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
|
@ -14,93 +14,95 @@
|
|||
</WindowChrome.WindowChrome>
|
||||
|
||||
<!-- Window Layout -->
|
||||
<Grid Background="{StaticResource Brush.Window}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Titlebar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- LOGO -->
|
||||
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Fetch}" Fill="{StaticResource Brush.FG1}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.UpdateAvailable}" FontWeight="Light"/>
|
||||
|
||||
<!-- Close Button -->
|
||||
<Button Click="Quit" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.HighlightHover}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="Red"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
|
||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Margin="8">
|
||||
<Border BorderBrush="{StaticResource}" BorderThickness="1">
|
||||
<Grid Background="{StaticResource Brush.Window}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="8"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Titlebar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Path Width="20" Height="20" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="#FFF05133"/>
|
||||
<Label x:Name="txtRelease" FontSize="18" FontWeight="Bold"/>
|
||||
</StackPanel>
|
||||
<!-- LOGO -->
|
||||
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Fetch}" Fill="{StaticResource Brush.FG1}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.Time}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="2" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="2" Grid.Column="2" x:Name="txtTime" Content="2020/11/30 00:00:00"/>
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.UpdateAvailable}" FontWeight="Light"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.Based}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="3" Grid.Column="2" x:Name="txtBasedOn" Content="724908ea"/>
|
||||
<!-- Close Button -->
|
||||
<Button Click="Quit" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.HighlightHover}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="Red"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.IsPreRelease}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="4" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="4" Grid.Column="2" x:Name="txtPrerelease" Content="NO"/>
|
||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3" Margin="6,6,6,0" BorderBrush="{StaticResource Brush.Border2}" BorderThickness="1">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock FontSize="10pt"
|
||||
FontFamily="Consolas"
|
||||
Padding="8"
|
||||
Opacity="0.8"
|
||||
Background="{StaticResource Brush.Contents}"
|
||||
Foreground="{StaticResource Brush.FG1}"
|
||||
x:Name="txtChangeLog"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<Grid Grid.Row="1" Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="8"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="32"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,8,0,0">
|
||||
<Button Width="80" Height="24" Style="{StaticResource Style.Button.AccentBordered}" Content="{StaticResource Text.UpdateAvailable.Download}" Click="Download"/>
|
||||
<Button Width="80" Margin="8,0,0,0" Height="24" Style="{StaticResource Style.Button.Bordered}" Content="{StaticResource Text.Cancel}" Click="Quit"/>
|
||||
</StackPanel>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Path Width="20" Height="20" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="#FFF05133"/>
|
||||
<Label x:Name="txtRelease" FontSize="18" FontWeight="Bold"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.Time}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="2" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="2" Grid.Column="2" x:Name="txtTime" Content="2020/11/30 00:00:00"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.Based}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="3" Grid.Column="2" x:Name="txtBasedOn" Content="724908ea"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.IsPreRelease}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="4" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="4" Grid.Column="2" x:Name="txtPrerelease" Content="NO"/>
|
||||
|
||||
<Border Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3" Margin="6,6,6,0" BorderBrush="{StaticResource Brush.Border2}" BorderThickness="1">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock FontSize="10pt"
|
||||
FontFamily="Consolas"
|
||||
Padding="8"
|
||||
Opacity="0.8"
|
||||
Background="{StaticResource Brush.Contents}"
|
||||
Foreground="{StaticResource Brush.FG1}"
|
||||
x:Name="txtChangeLog"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,8,0,0">
|
||||
<Button Width="80" Height="24" Style="{StaticResource Style.Button.AccentBordered}" Content="{StaticResource Text.UpdateAvailable.Download}" Click="Download"/>
|
||||
<Button Width="80" Margin="8,0,0,0" Height="24" Style="{StaticResource Style.Button.Bordered}" Content="{StaticResource Text.Cancel}" Click="Quit"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
|
|
Loading…
Reference in a new issue