mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-01 17:24:59 +00:00
style<*>: text render styles
This commit is contained in:
parent
316344939a
commit
76a4e37736
31 changed files with 139 additions and 144 deletions
|
@ -1,28 +1,52 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:SourceGit.Views.Controls">
|
||||
<Style x:Key="Style.TextBlock.Base" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="FontFamily" Value="Consolas,Microsoft YaHei UI"/>
|
||||
<Setter Property="FontSize" Value="9pt"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
|
||||
<Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
|
||||
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Style.TextBlock.LineNumber" TargetType="{x:Type TextBlock}">
|
||||
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Style.TextBlock.Base}"/>
|
||||
|
||||
<Style x:Key="Style.TextBlock.Group" TargetType="{x:Type TextBlock}" BasedOn="{x:Null}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/>
|
||||
<Setter Property="FontFamily" Value="Microsoft YaHei UI"/>
|
||||
<Setter Property="FontWeight" Value="ExtraBold"/>
|
||||
<Setter Property="FontSize" Value="9pt"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="8,0,0,0"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Style.TextBlock.Header" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Style.TextBlock.Group}">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Style.TextBlock.LineNumber" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Style.TextBlock.Base}">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Padding" Value="8,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Style.TextBlock.LineContent" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="FontSize" Value="9pt"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Style x:Key="Style.TextBlock.LineContent" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Style.TextBlock.Base}">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="4,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type controls:HighlightableTextBlock}" BasedOn="{StaticResource Style.TextBlock.Base}">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="LineHeight" Value="16"/>
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="4,0,0,0"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
Loading…
Add table
Add a link
Reference in a new issue