mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 22:25:00 +00:00
optimize<Theme>: rename brushes used by this app and re-design light-theme
This commit is contained in:
parent
f944ded171
commit
f98b73eaea
52 changed files with 553 additions and 532 deletions
|
@ -18,179 +18,177 @@
|
|||
</WindowChrome.WindowChrome>
|
||||
|
||||
<!-- Window Layout -->
|
||||
<Border Background="{StaticResource Brush.BG1}">
|
||||
<Grid>
|
||||
<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="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">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="36"/>
|
||||
<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>
|
||||
|
||||
<!-- Titlebar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.BG4}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="136"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 通用 -->
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" Content="GENERAL SETTING" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Light Theme :" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=UI.UseLightTheme, Mode=TwoWay}"
|
||||
Content="Restart required"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Check for Update :" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=CheckUpdate, Mode=TwoWay}"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
|
||||
<!-- GIT相关配置 -->
|
||||
<Label Grid.Row="4" Grid.ColumnSpan="2" Content="GIT INSTANCE" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="Install Path :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="5" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<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="#FFF05133"/>
|
||||
<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="Input path for git.exe"/>
|
||||
<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="6" Grid.Column="0" Content="Default Clone Dir :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="6" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="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}"/>
|
||||
<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="Default path to clone repo into"/>
|
||||
<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>
|
||||
|
||||
<!-- Content -->
|
||||
<Grid Grid.Row="1" Margin="16,8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="36"/>
|
||||
<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>
|
||||
<!-- Global User -->
|
||||
<Label Grid.Row="8" Grid.ColumnSpan="2" Content="GLOBAL SETTING" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="9" Grid.Column="0" Content="Name :" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="9" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user name" Text="{Binding ElementName=me, Path=GlobalUser, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="10" Grid.Column="0" Content="Email :" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user email" Text="{Binding ElementName=me, Path=GlobalUserEmail, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="11" Grid.Column="0" Content="Auto CRLF :" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="11" 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="13" Grid.ColumnSpan="2" Content="MERGE TOOL" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="14" Grid.Column="0" Content="Merger :" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="14" 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="15" Grid.Column="0" Content="Install Path :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="15" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="136"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 通用 -->
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" Content="GENERAL SETTING" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Light Theme :" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=UI.UseLightTheme, Mode=TwoWay}"
|
||||
Content="Restart required"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Check for Update :" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=CheckUpdate, Mode=TwoWay}"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
|
||||
<!-- GIT相关配置 -->
|
||||
<Label Grid.Row="4" Grid.ColumnSpan="2" Content="GIT INSTANCE" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="Install Path :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="5" 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="Input path for git.exe"/>
|
||||
<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="6" Grid.Column="0" Content="Default Clone Dir :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="6" 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="Default path to clone repo into"/>
|
||||
<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="8" Grid.ColumnSpan="2" Content="GLOBAL SETTING" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="9" Grid.Column="0" Content="Name :" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="9" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user name" Text="{Binding ElementName=me, Path=GlobalUser, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="10" Grid.Column="0" Content="Email :" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user email" Text="{Binding ElementName=me, Path=GlobalUserEmail, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="11" Grid.Column="0" Content="Auto CRLF :" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="11" 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="13" Grid.ColumnSpan="2" Content="MERGE TOOL" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="14" Grid.Column="0" Content="Merger :" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="14" 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="15" Grid.Column="0" Content="Install Path :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="15" 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="Input path for merge tool"/>
|
||||
<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="16" Grid.Column="0" Content="Command :" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Row="16" Grid.Column="1"
|
||||
x:Name="txtMergeParam"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{StaticResource Brush.FG2}"/>
|
||||
<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="Input path for merge tool"/>
|
||||
<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="16" Grid.Column="0" Content="Command :" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Row="16" Grid.Column="1"
|
||||
x:Name="txtMergeParam"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{StaticResource Brush.FG2}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
Loading…
Add table
Add a link
Reference in a new issue