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.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.Clone">Clone Remote Repository</sys:String>
<sys:String x:Key="Text.Welcome.Repositories">REPOSITORIES</sys:String>

View file

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

View file

@ -92,7 +92,7 @@
<ColumnDefinition Width="*"/>
</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">
<Run Text="{Binding ShortSHA, Mode=OneWay}"/>
</Hyperlink>
@ -101,13 +101,17 @@
<TextBlock
Grid.Column="1"
Text="{Binding Author.Time}"
FontSize="11"
FontSize="9pt" FontFamily="Consolas"
Foreground="{StaticResource Brush.FG2}"
Margin="4,0,0,0"
HorizontalAlignment="Right"/>
</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>
</Border>

View file

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

View file

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

View file

@ -31,7 +31,7 @@
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal" Height="24">
<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>
<HierarchicalDataTemplate.Triggers>

View file

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