refactor: setup fonts based on operating system

This commit is contained in:
leo 2024-03-08 12:22:22 +08:00
parent 267c955c88
commit 2182d39e5f
6 changed files with 50 additions and 28 deletions

View file

@ -1,9 +1,12 @@
using System;
using Avalonia;
using System;
using System.Diagnostics;
namespace SourceGit.Native {
public static class OS {
public interface IBackend {
void SetupFonts(AppBuilder builder);
string FindGitExecutable();
string FindVSCode();
@ -38,6 +41,10 @@ namespace SourceGit.Native {
}
}
public static void SetupFonts(AppBuilder builder) {
_backend?.SetupFonts(builder);
}
public static string FindGitExecutable() {
return _backend?.FindGitExecutable();
}