refactor: rewrite the font configuration (#366)

* input font name directly instead of a font picker because localized font family name is not supported by Avalonia
* fallback monospace font to default font
* remove unused code
This commit is contained in:
leo 2024-08-19 17:14:41 +08:00
parent 24dde77548
commit 9057b71f2d
No known key found for this signature in database
20 changed files with 96 additions and 169 deletions

View file

@ -95,7 +95,7 @@
Margin="6,0"
VerticalAlignment="Center"
Count="{Binding LocalChangesCount}"
FontFamily="{Binding Source={x:Static vm:Preference.Instance}, Path=MonospaceFont}"
FontFamily="{DynamicResource Fonts.Monospace}"
FontSize="10"
Foreground="{DynamicResource Brush.BadgeFG}"
Background="{DynamicResource Brush.Badge}"/>
@ -110,7 +110,7 @@
Margin="6,0"
VerticalAlignment="Center"
Count="{Binding StashesCount}"
FontFamily="{Binding Source={x:Static vm:Preference.Instance}, Path=MonospaceFont}"
FontFamily="{DynamicResource Fonts.Monospace}"
FontSize="10"
Foreground="{DynamicResource Brush.BadgeFG}"
Background="{DynamicResource Brush.Badge}"/>