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);
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
|
||||||
var pref = ViewModels.Preference.Instance;
|
var pref = ViewModels.Preference.Instance;
|
||||||
pref.PropertyChanged += (_1, _2) => pref.Save();
|
pref.PropertyChanged += (_, _) => pref.Save();
|
||||||
|
|
||||||
SetLocale(pref.Locale);
|
SetLocale(pref.Locale);
|
||||||
SetTheme(pref.Theme, pref.ThemeOverrides);
|
SetTheme(pref.Theme, pref.ThemeOverrides);
|
||||||
|
|
|
@ -5,6 +5,7 @@ using System.IO;
|
||||||
using System.Runtime.Versioning;
|
using System.Runtime.Versioning;
|
||||||
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
|
using Avalonia.Media;
|
||||||
|
|
||||||
namespace SourceGit.Native
|
namespace SourceGit.Native
|
||||||
{
|
{
|
||||||
|
@ -36,6 +37,12 @@ namespace SourceGit.Native
|
||||||
|
|
||||||
public void SetupApp(AppBuilder builder)
|
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()
|
builder.With(new X11PlatformOptions()
|
||||||
{
|
{
|
||||||
EnableIme = true,
|
EnableIme = true,
|
||||||
|
|
|
@ -99,6 +99,6 @@
|
||||||
<SolidColorBrush x:Key="Brush.Link" Color="{DynamicResource Color.Link}"/>
|
<SolidColorBrush x:Key="Brush.Link" Color="{DynamicResource Color.Link}"/>
|
||||||
|
|
||||||
<FontFamily x:Key="Fonts.Default">$Default</FontFamily>
|
<FontFamily x:Key="Fonts.Default">$Default</FontFamily>
|
||||||
<FontFamily x:Key="Fonts.Monospace">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,$Default</FontFamily>
|
<FontFamily x:Key="Fonts.Primary">fonts:SourceGit#JetBrains Mono</FontFamily>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
Loading…
Reference in a new issue