enhance: use custom JsonConverter instead of converting string to FontFamily in each control

This commit is contained in:
leo 2024-03-21 23:19:09 +08:00
parent 0fadab2ca2
commit 56f5f3b4a7
10 changed files with 49 additions and 49 deletions

View file

@ -16,7 +16,7 @@
</Style>
<Style Selector="ContentPresenter">
<Setter Property="FontFamily" Value="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFont, Converter={x:Static c:StringConverters.ToFontFamily}}"/>
<Setter Property="FontFamily" Value="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFont}"/>
</Style>
<Style Selector="Path">
@ -70,7 +70,7 @@
<Setter Property="FontStyle" Value="Italic"/>
</Style>
<Style Selector="TextBlock.monospace">
<Setter Property="FontFamily" Value="{Binding Source={x:Static vm:Preference.Instance}, Path=MonospaceFont, Converter={x:Static c:StringConverters.ToFontFamily}}"/>
<Setter Property="FontFamily" Value="{Binding Source={x:Static vm:Preference.Instance}, Path=MonospaceFont}"/>
</Style>
<Style Selector="TextBlock.group_header_label">
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/>