mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
fix: failed get default font on some Linux distro (#447)
This commit is contained in:
parent
2a59cdbe92
commit
6688319714
3 changed files with 10 additions and 3 deletions
|
@ -75,7 +75,7 @@ namespace SourceGit
|
|||
AvaloniaXamlLoader.Load(this);
|
||||
|
||||
var pref = ViewModels.Preference.Instance;
|
||||
pref.PropertyChanged += (_1, _2) => pref.Save();
|
||||
pref.PropertyChanged += (_, _) => pref.Save();
|
||||
|
||||
SetLocale(pref.Locale);
|
||||
SetTheme(pref.Theme, pref.ThemeOverrides);
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.IO;
|
|||
using System.Runtime.Versioning;
|
||||
|
||||
using Avalonia;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace SourceGit.Native
|
||||
{
|
||||
|
@ -36,6 +37,12 @@ namespace SourceGit.Native
|
|||
|
||||
public void SetupApp(AppBuilder builder)
|
||||
{
|
||||
// Fix issue https://github.com/sourcegit-scm/sourcegit/issues/447
|
||||
builder.With(new FontManagerOptions()
|
||||
{
|
||||
DefaultFamilyName = "fonts:SourceGit#JetBrains Mono",
|
||||
});
|
||||
|
||||
builder.With(new X11PlatformOptions()
|
||||
{
|
||||
EnableIme = true,
|
||||
|
|
|
@ -99,6 +99,6 @@
|
|||
<SolidColorBrush x:Key="Brush.Link" Color="{DynamicResource Color.Link}"/>
|
||||
|
||||
<FontFamily x:Key="Fonts.Default">$Default</FontFamily>
|
||||
<FontFamily x:Key="Fonts.Monospace">fonts:SourceGit#JetBrains Mono,$Default</FontFamily>
|
||||
<FontFamily x:Key="Fonts.Primary">fonts:SourceGit#JetBrains Mono,$Default</FontFamily>
|
||||
<FontFamily x:Key="Fonts.Monospace">fonts:SourceGit#JetBrains Mono</FontFamily>
|
||||
<FontFamily x:Key="Fonts.Primary">fonts:SourceGit#JetBrains Mono</FontFamily>
|
||||
</ResourceDictionary>
|
||||
|
|
Loading…
Reference in a new issue