diff --git a/SFP_UI/App.axaml.cs b/SFP_UI/App.axaml.cs index 6075f6c..fa1b45e 100644 --- a/SFP_UI/App.axaml.cs +++ b/SFP_UI/App.axaml.cs @@ -53,7 +53,14 @@ public override async void OnFrameworkInitializationCompleted() return; } - SetIconsState(Settings.Default.ShowTrayIcon); + if (OperatingSystem.IsMacOS()) + { + SetIconsState(true); + } + else + { + SetIconsState(Settings.Default.ShowTrayIcon); + } Injector.SetColorScheme(ActualThemeVariant.ToString()); Injector.SetAccentColors(GetColorValues()); diff --git a/SFP_UI/Pages/SettingsPage.axaml b/SFP_UI/Pages/SettingsPage.axaml index f52bcff..65dbfd4 100644 --- a/SFP_UI/Pages/SettingsPage.axaml +++ b/SFP_UI/Pages/SettingsPage.axaml @@ -9,9 +9,12 @@ Check for updates on startup - Show tray icon - Minimize to tray - Close to tray + Show + tray icon + Minimize + to tray + Close to + tray Start minimized Inject on app start Run Steam on start diff --git a/SFP_UI/Program.cs b/SFP_UI/Program.cs index 0461e5e..e414948 100644 --- a/SFP_UI/Program.cs +++ b/SFP_UI/Program.cs @@ -159,7 +159,8 @@ private static AppBuilder BuildAvaloniaApp() .LogToTrace() .UseReactiveUI() .With(new Win32PlatformOptions { OverlayPopups = true }) - .With(new FontManagerOptions { DefaultFamilyName = fontName }); + .With(new FontManagerOptions { DefaultFamilyName = fontName }) + .With(new MacOSPlatformOptions() { ShowInDock = false }); } private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) diff --git a/SFP_UI/ViewModels/SettingsPageViewModel.cs b/SFP_UI/ViewModels/SettingsPageViewModel.cs index 15a5fd0..16c5210 100644 --- a/SFP_UI/ViewModels/SettingsPageViewModel.cs +++ b/SFP_UI/ViewModels/SettingsPageViewModel.cs @@ -67,6 +67,7 @@ public partial class SettingsPageViewModel : ViewModelBase #endregion public bool IsWindows { get; } = OperatingSystem.IsWindows(); + public bool IsMacOs { get; } = OperatingSystem.IsMacOS(); public SettingsPageViewModel() { diff --git a/SFP_UI/Views/MainWindow.axaml.cs b/SFP_UI/Views/MainWindow.axaml.cs index 25adafd..d479ac9 100644 --- a/SFP_UI/Views/MainWindow.axaml.cs +++ b/SFP_UI/Views/MainWindow.axaml.cs @@ -121,6 +121,10 @@ protected override async void OnClosing(WindowClosingEventArgs e) return; } Instance = null; + if (OperatingSystem.IsMacOS()) + { + return; + } if (Settings.Default.CloseToTray) { return;