fix: add default theme textelement handling.
This commit is contained in:
parent
7fb3460e02
commit
ee4a9c0e9a
@ -2,5 +2,8 @@
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type ThemeVariantScope}" TargetType="ThemeVariantScope">
|
||||
<!-- Add Resources Here -->
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource DefaultForeground}" />
|
||||
<Setter Property="TextElement.FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||
<Setter Property="TextElement.FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
|
@ -1,7 +1,16 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<!-- Add Resources Here -->
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Default">
|
||||
<SolidColorBrush x:Key="DefaultForeground" Color="#1C1F23" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<SolidColorBrush x:Key="DefaultForeground" Color="#F9F9F9" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<sys:Double x:Key="DefaultFontSize">14</sys:Double>
|
||||
<FontFamily x:Key="DefaultFontFamily">Inter, -apple-system,BlinkMacSystemFont,PingFang SC, Microsoft YaHei, Segoe UI, Hiragino Sans GB, Helvetica Neue,Helvetica,Arial,sans-serif</FontFamily>
|
||||
<FontFamily x:Key="CodeFontFamily">Cascadia Code, Consolas, Inconsolata, monospace</FontFamily>
|
||||
|
Loading…
x
Reference in New Issue
Block a user