style: border-less window style on Linux platform.

This commit is contained in:
leo 2024-03-14 18:23:36 +08:00
parent f4b396596b
commit 035300a612
23 changed files with 752 additions and 427 deletions

View file

@ -6,7 +6,7 @@ using System.Runtime.Versioning;
namespace SourceGit.Native {
[SupportedOSPlatform("linux")]
internal class Linux : OS.IBackend {
public void SetupFonts(AppBuilder builder) {
public void SetupApp(AppBuilder builder) {
#if USE_FONT_INTER
builder.WithInterFont();
#endif

View file

@ -8,7 +8,7 @@ using System.Text;
namespace SourceGit.Native {
[SupportedOSPlatform("macOS")]
internal class MacOS : OS.IBackend {
public void SetupFonts(AppBuilder builder) {
public void SetupApp(AppBuilder builder) {
builder.With(new FontManagerOptions() {
DefaultFamilyName = "PingFang SC",
FontFallbacks = [

View file

@ -5,7 +5,7 @@ using System.Diagnostics;
namespace SourceGit.Native {
public static class OS {
public interface IBackend {
void SetupFonts(AppBuilder builder);
void SetupApp(AppBuilder builder);
string FindGitExecutable();
string FindVSCode();
@ -41,8 +41,8 @@ namespace SourceGit.Native {
}
}
public static void SetupFonts(AppBuilder builder) {
_backend?.SetupFonts(builder);
public static void SetupApp(AppBuilder builder) {
_backend?.SetupApp(builder);
}
public static string FindGitExecutable() {

View file

@ -13,7 +13,7 @@ namespace SourceGit.Native {
[DllImport("shlwapi.dll", CharSet = CharSet.Unicode, SetLastError = false)]
private static extern bool PathFindOnPath([In, Out] StringBuilder pszFile, [In] string[] ppszOtherDirs);
public void SetupFonts(AppBuilder builder) {
public void SetupApp(AppBuilder builder) {
builder.With(new FontManagerOptions() {
DefaultFamilyName = "Microsoft YaHei UI",
FontFallbacks = [