style<*>: font size and weight

This commit is contained in:
leo 2021-05-18 09:08:55 +08:00
parent 8c1674aef7
commit bfade2e69b
7 changed files with 43 additions and 28 deletions

View file

@ -287,7 +287,7 @@
<sys:String x:Key="Text.Merge.Into">Into :</sys:String> <sys:String x:Key="Text.Merge.Into">Into :</sys:String>
<sys:String x:Key="Text.Merge.Mode">Merge Option :</sys:String> <sys:String x:Key="Text.Merge.Mode">Merge Option :</sys:String>
<sys:String x:Key="Text.Welcome.Title">Welcome to SourceGit :)</sys:String> <sys:String x:Key="Text.Welcome.Title">SourceGit</sys:String>
<sys:String x:Key="Text.Welcome.OpenOrInit">Open Local Repository</sys:String> <sys:String x:Key="Text.Welcome.OpenOrInit">Open Local Repository</sys:String>
<sys:String x:Key="Text.Welcome.Clone">Clone Remote Repository</sys:String> <sys:String x:Key="Text.Welcome.Clone">Clone Remote Repository</sys:String>
<sys:String x:Key="Text.Welcome.Repositories">REPOSITORIES</sys:String> <sys:String x:Key="Text.Welcome.Repositories">REPOSITORIES</sys:String>

View file

@ -38,16 +38,17 @@
<Border <Border
x:Name="Border" x:Name="Border"
BorderThickness="0,0,0,1" BorderThickness="0,0,0,1"
BorderBrush="Transparent"> BorderBrush="Transparent"
Opacity=".56">
<ContentPresenter <ContentPresenter
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Center" HorizontalAlignment="Center"
ContentSource="Header" ContentSource="Header"
Margin="8,6"> Margin="8,4">
<ContentPresenter.Resources> <ContentPresenter.Resources>
<Style TargetType="{x:Type TextBlock}"> <Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/> <Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="FontWeight" Value="Bold"/> <Setter Property="FontWeight" Value="DemiBold"/>
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=IsSelected}" Value="True"> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=IsSelected}" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent1}"/> <Setter Property="Foreground" Value="{DynamicResource Brush.Accent1}"/>
@ -60,6 +61,7 @@
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True"> <Trigger Property="IsSelected" Value="True">
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource Brush.Accent1}"/> <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource Brush.Accent1}"/>
<Setter TargetName="Border" Property="Opacity" Value="1"/>
</Trigger> </Trigger>
<MultiTrigger> <MultiTrigger>
<MultiTrigger.Conditions> <MultiTrigger.Conditions>
@ -67,6 +69,7 @@
<Condition Property="IsMouseOver" Value="True"/> <Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions> </MultiTrigger.Conditions>
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource Brush.Accent2}"/> <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource Brush.Accent2}"/>
<Setter TargetName="Border" Property="Opacity" Value=".7"/>
</MultiTrigger> </MultiTrigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>

View file

@ -92,7 +92,7 @@
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" FontSize="11"> <TextBlock Grid.Column="0" FontSize="9pt" FontFamily="Consolas">
<Hyperlink NavigateUri="{Binding SHA}" RequestNavigate="GotoCommit" Foreground="DarkOrange" ToolTip="GOTO COMMIT"> <Hyperlink NavigateUri="{Binding SHA}" RequestNavigate="GotoCommit" Foreground="DarkOrange" ToolTip="GOTO COMMIT">
<Run Text="{Binding ShortSHA, Mode=OneWay}"/> <Run Text="{Binding ShortSHA, Mode=OneWay}"/>
</Hyperlink> </Hyperlink>
@ -101,13 +101,17 @@
<TextBlock <TextBlock
Grid.Column="1" Grid.Column="1"
Text="{Binding Author.Time}" Text="{Binding Author.Time}"
FontSize="11" FontSize="9pt" FontFamily="Consolas"
Foreground="{StaticResource Brush.FG2}" Foreground="{StaticResource Brush.FG2}"
Margin="4,0,0,0" Margin="4,0,0,0"
HorizontalAlignment="Right"/> HorizontalAlignment="Right"/>
</Grid> </Grid>
<TextBlock Grid.Row="1" Text="{Binding Subject}" Margin="0,6,0,0"/> <TextBlock
Grid.Row="1"
Text="{Binding Subject}"
FontSize="9pt" FontFamily="Consolas,SimSun"
Margin="0,6,0,0"/>
</Grid> </Grid>
</Grid> </Grid>
</Border> </Border>

View file

@ -37,12 +37,12 @@
<!-- Author Info --> <!-- Author Info -->
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical"> <StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
<TextBlock Text="{StaticResource Text.CommitViewer.Info.Author}" Foreground="{StaticResource Brush.FG2}"/> <TextBlock FontWeight="Bold" Text="{StaticResource Text.CommitViewer.Info.Author}" Foreground="{StaticResource Brush.FG2}"/>
<StackPanel Orientation="Horizontal" Margin="0,12,0,8"> <StackPanel Orientation="Horizontal" Margin="0,12,0,8">
<controls:TextEdit x:Name="txtAuthorName" IsReadOnly="True" BorderThickness="0"/> <controls:TextEdit x:Name="txtAuthorName" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0"/>
<controls:TextEdit x:Name="txtAuthorEmail" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0"/> <controls:TextEdit x:Name="txtAuthorEmail" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0"/>
</StackPanel> </StackPanel>
<controls:TextEdit x:Name="txtAuthorTime" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" FontSize="8pt"/> <controls:TextEdit x:Name="txtAuthorTime" FontFamily="Consolas" FontSize="9pt" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}"/>
</StackPanel> </StackPanel>
<!-- Committer Avatar --> <!-- Committer Avatar -->
@ -54,12 +54,12 @@
<!-- Committer Info --> <!-- Committer Info -->
<StackPanel x:Name="committerInfoPanel" Grid.Column="3" Margin="16,0,8,0" Orientation="Vertical"> <StackPanel x:Name="committerInfoPanel" Grid.Column="3" Margin="16,0,8,0" Orientation="Vertical">
<TextBlock Text="{StaticResource Text.CommitViewer.Info.Committer}" Foreground="{StaticResource Brush.FG2}"/> <TextBlock FontWeight="Bold" Text="{StaticResource Text.CommitViewer.Info.Committer}" Foreground="{StaticResource Brush.FG2}"/>
<StackPanel Orientation="Horizontal" Margin="0,12,0,6"> <StackPanel Orientation="Horizontal" Margin="0,12,0,8">
<controls:TextEdit x:Name="txtCommitterName" IsReadOnly="True" BorderThickness="0"/> <controls:TextEdit x:Name="txtCommitterName" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0"/>
<controls:TextEdit x:Name="txtCommitterEmail" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0"/> <controls:TextEdit x:Name="txtCommitterEmail" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0"/>
</StackPanel> </StackPanel>
<controls:TextEdit x:Name="txtCommitterTime" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" FontSize="10"/> <controls:TextEdit x:Name="txtCommitterTime" FontFamily="Consolas" FontSize="9pt" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
@ -84,6 +84,7 @@
<TextBlock <TextBlock
Grid.Row="0" Grid.Column="0" Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
FontWeight="Bold"
Text="{StaticResource Text.CommitViewer.Info.SHA}" Text="{StaticResource Text.CommitViewer.Info.SHA}"
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>
<controls:TextEdit <controls:TextEdit
@ -99,6 +100,7 @@
<TextBlock <TextBlock
Grid.Row="1" Grid.Column="0" Grid.Row="1" Grid.Column="0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
FontWeight="Bold"
Text="{StaticResource Text.CommitViewer.Info.Parents}" Text="{StaticResource Text.CommitViewer.Info.Parents}"
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>
<ItemsControl Grid.Row="1" Grid.Column="1" x:Name="listParents" Height="24" Margin="13,0,0,0"> <ItemsControl Grid.Row="1" Grid.Column="1" x:Name="listParents" Height="24" Margin="13,0,0,0">
@ -123,6 +125,7 @@
<TextBlock <TextBlock
Grid.Row="2" Grid.Column="0" Grid.Row="2" Grid.Column="0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
FontWeight="Bold"
Text="{StaticResource Text.CommitViewer.Info.Refs}" Text="{StaticResource Text.CommitViewer.Info.Refs}"
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>
<ItemsControl Grid.Row="2" Grid.Column="1" x:Name="listRefs" Height="24" Margin="11,0,0,0"> <ItemsControl Grid.Row="2" Grid.Column="1" x:Name="listRefs" Height="24" Margin="11,0,0,0">
@ -140,7 +143,7 @@
</Border> </Border>
<Border x:Name="Color" Background="#FFFFB835"> <Border x:Name="Color" Background="#FFFFB835">
<TextBlock Text="{Binding Name}" FontSize="11" Margin="4,0" Foreground="Black"/> <TextBlock Text="{Binding Name}" FontSize="8pt" Margin="4,0" Foreground="Black"/>
</Border> </Border>
</StackPanel> </StackPanel>
@ -165,6 +168,7 @@
Grid.Row="3" Grid.Column="0" Grid.Row="3" Grid.Column="0"
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Right" VerticalAlignment="Top" HorizontalAlignment="Right" VerticalAlignment="Top"
FontWeight="Bold"
Text="{StaticResource Text.CommitViewer.Info.Message}" Text="{StaticResource Text.CommitViewer.Info.Message}"
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>
<controls:TextEdit <controls:TextEdit
@ -172,6 +176,7 @@
x:Name="txtMessage" x:Name="txtMessage"
IsReadOnly="true" IsReadOnly="true"
FontFamily="Consolas,SimSun" FontFamily="Consolas,SimSun"
FontSize="9pt"
BorderThickness="0" BorderThickness="0"
TextWrapping="Wrap" TextWrapping="Wrap"
Margin="11,5,16,0" Margin="11,5,16,0"
@ -192,6 +197,7 @@
Grid.Column="0" Grid.Column="0"
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Right" VerticalAlignment="Top" HorizontalAlignment="Right" VerticalAlignment="Top"
FontWeight="Bold"
Text="{StaticResource Text.CommitViewer.Info.Changed}" Text="{StaticResource Text.CommitViewer.Info.Changed}"
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>

View file

@ -42,7 +42,7 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Grid.Row="0" TextBlock.FontSize="11" TextBlock.FontFamily="Consolas"> <Grid Grid.Row="0" TextBlock.FontSize="9pt" TextBlock.FontFamily="Consolas">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
@ -52,7 +52,7 @@
<TextBlock Grid.Column="1" x:Name="txtStartTime" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/> <TextBlock Grid.Column="1" x:Name="txtStartTime" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/>
</Grid> </Grid>
<TextBlock Grid.Row="1" x:Name="txtStartSubject" VerticalAlignment="Bottom"/> <TextBlock Grid.Row="1" x:Name="txtStartSubject" FontSize="10pt" FontFamily="Consolas,SimSun" VerticalAlignment="Bottom"/>
</Grid> </Grid>
</Grid> </Grid>
</Border> </Border>
@ -88,7 +88,7 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Grid.Row="0" TextBlock.FontSize="11" TextBlock.FontFamily="Consolas"> <Grid Grid.Row="0" TextBlock.FontSize="9pt" TextBlock.FontFamily="Consolas">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
@ -98,7 +98,7 @@
<TextBlock Grid.Column="1" x:Name="txtEndTime" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/> <TextBlock Grid.Column="1" x:Name="txtEndTime" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/>
</Grid> </Grid>
<TextBlock Grid.Row="1" x:Name="txtEndSubject" VerticalAlignment="Bottom"/> <TextBlock Grid.Row="1" x:Name="txtEndSubject" FontSize="10pt" FontFamily="Consolas,SimSun" VerticalAlignment="Bottom"/>
</Grid> </Grid>
</Grid> </Grid>
</Border> </Border>

View file

@ -31,7 +31,7 @@
<HierarchicalDataTemplate ItemsSource="{Binding Children}"> <HierarchicalDataTemplate ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal" Height="24"> <StackPanel Orientation="Horizontal" Height="24">
<Path x:Name="Icon" Width="14" Height="14" Data="{StaticResource Icon.File}"/> <Path x:Name="Icon" Width="14" Height="14" Data="{StaticResource Icon.File}"/>
<TextBlock Margin="6,0,0,0" FontSize="11" Text="{Binding Path, Converter={StaticResource PureFileName}}"/> <TextBlock Margin="6,0,0,0" FontSize="9pt" Text="{Binding Path, Converter={StaticResource PureFileName}}"/>
</StackPanel> </StackPanel>
<HierarchicalDataTemplate.Triggers> <HierarchicalDataTemplate.Triggers>

View file

@ -27,8 +27,10 @@
Margin="0,16" Margin="0,16"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Text="{StaticResource Text.Welcome.Title}" Text="{StaticResource Text.Welcome.Title}"
FontSize="28" FontSize="24pt"
FontWeight="ExtraBold" FontWeight="ExtraBold"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>
<!-- Options --> <!-- Options -->
@ -68,13 +70,13 @@
<TextBlock <TextBlock
Grid.Column="0" Grid.Column="0"
Text="{StaticResource Text.Welcome.Repositories}" Text="{StaticResource Text.Welcome.Repositories}"
FontSize="18" FontWeight="ExtraBold" FontSize="13pt" FontWeight="ExtraBold" FontFamily="Consolas,Microsoft YaHei UI"
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>
<TextBlock <TextBlock
Grid.Column="2" Grid.Column="2"
Text="{StaticResource Text.Welcome.DragDrop}" Text="{StaticResource Text.Welcome.DragDrop}"
FontSize="14" FontSize="10pt" FontFamily="Consolas,Microsoft YaHei UI"
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
@ -126,7 +128,7 @@
<Path Grid.Column="0" Margin="2,0,0,0" x:Name="Icon" Width="16" Height="16" Data="{StaticResource Icon.Git}"/> <Path Grid.Column="0" Margin="2,0,0,0" x:Name="Icon" Width="16" Height="16" Data="{StaticResource Icon.Git}"/>
<StackPanel Grid.Column="1" x:Name="Contents" Orientation="Horizontal"> <StackPanel Grid.Column="1" x:Name="Contents" Orientation="Horizontal">
<TextBlock Margin="8,0" Text="{Binding Name}"/> <TextBlock Margin="8,0" FontSize="9pt" FontFamily="Consolas,Microsoft YaHei UI" Text="{Binding Name}"/>
<TextBlock x:Name="Path" Text="{Binding Id}" Foreground="{StaticResource Brush.FG2}"/> <TextBlock x:Name="Path" Text="{Binding Id}" Foreground="{StaticResource Brush.FG2}"/>
</StackPanel> </StackPanel>
@ -136,7 +138,7 @@
Height="20" Height="20"
Margin="4,0,0,0" Margin="4,0,0,0"
Text="{Binding Name}" Text="{Binding Name}"
FontSize="12" FontSize="9pt"
Loaded="RenameStart" Loaded="RenameStart"
KeyDown="RenameKeyDown" KeyDown="RenameKeyDown"
LostFocus="RenameEnd" LostFocus="RenameEnd"