From f4f8e3d822a7f264ebdc5abed3d97b1b5daea10c Mon Sep 17 00:00:00 2001 From: Yuki Walsh Date: Mon, 9 Feb 2026 14:36:27 +1100 Subject: [PATCH 1/8] hide sfp_ui in dock --- SFP_UI/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) From 6ded61b3b6aadaf9f44d9790a41d47bd508307fa Mon Sep 17 00:00:00 2001 From: Yuki Walsh Date: Mon, 9 Feb 2026 14:47:55 +1100 Subject: [PATCH 2/8] enable app bundle build --- createpublishedzip.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/createpublishedzip.ps1 b/createpublishedzip.ps1 index 7e87c0c..94a4b1b 100644 --- a/createpublishedzip.ps1 +++ b/createpublishedzip.ps1 @@ -11,7 +11,7 @@ function Build-SFP param ( [string]$TargetRuntime, [bool]$selfContained = $True, - [bool]$bundle = $False + [bool]$bundle = $True ) Remove-Item -Path "./$configuration/publish" -Recurse -Force -ErrorAction Ignore From 1179426bfab20098f0c377648947f4f4a0c64778 Mon Sep 17 00:00:00 2001 From: Yuki Walsh Date: Mon, 9 Feb 2026 14:50:13 +1100 Subject: [PATCH 3/8] enable apphost --- SFP_UI/SFP_UI.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/SFP_UI/SFP_UI.csproj b/SFP_UI/SFP_UI.csproj index e353c9c..265dd61 100644 --- a/SFP_UI/SFP_UI.csproj +++ b/SFP_UI/SFP_UI.csproj @@ -13,6 +13,7 @@ true true true + true From 1f9ce0a36188c08809446b2ea1f99fb32a988668 Mon Sep 17 00:00:00 2001 From: Yuki Walsh Date: Mon, 9 Feb 2026 18:23:36 +1100 Subject: [PATCH 4/8] revert changes to UseAppHost and appBundle --- SFP_UI/SFP_UI.csproj | 1 - createpublishedzip.ps1 | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/SFP_UI/SFP_UI.csproj b/SFP_UI/SFP_UI.csproj index 265dd61..e353c9c 100644 --- a/SFP_UI/SFP_UI.csproj +++ b/SFP_UI/SFP_UI.csproj @@ -13,7 +13,6 @@ true true true - true diff --git a/createpublishedzip.ps1 b/createpublishedzip.ps1 index 94a4b1b..7e87c0c 100644 --- a/createpublishedzip.ps1 +++ b/createpublishedzip.ps1 @@ -11,7 +11,7 @@ function Build-SFP param ( [string]$TargetRuntime, [bool]$selfContained = $True, - [bool]$bundle = $True + [bool]$bundle = $False ) Remove-Item -Path "./$configuration/publish" -Recurse -Force -ErrorAction Ignore From 659be5b3f4a35a6cc97b692192a6c57a8a54e3ea Mon Sep 17 00:00:00 2001 From: Yuki Walsh Date: Mon, 9 Feb 2026 18:31:05 +1100 Subject: [PATCH 5/8] prevent hiding the tray icon on OSX as there's no dock icon to open the app from. --- SFP_UI/App.axaml.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SFP_UI/App.axaml.cs b/SFP_UI/App.axaml.cs index 6075f6c..6647822 100644 --- a/SFP_UI/App.axaml.cs +++ b/SFP_UI/App.axaml.cs @@ -4,6 +4,7 @@ using Avalonia.Controls; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; +using System.Runtime.InteropServices; using Avalonia.Styling; using Avalonia.Threading; @@ -53,7 +54,14 @@ public override async void OnFrameworkInitializationCompleted() return; } - SetIconsState(Settings.Default.ShowTrayIcon); + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + SetIconsState(true); + } + else + { + SetIconsState(Settings.Default.ShowTrayIcon); + } Injector.SetColorScheme(ActualThemeVariant.ToString()); Injector.SetAccentColors(GetColorValues()); From fb745b3ee68ea33c200d01fb29e2a641c1298dd4 Mon Sep 17 00:00:00 2001 From: Yuki Walsh Date: Mon, 9 Feb 2026 18:34:29 +1100 Subject: [PATCH 6/8] Hide system tray options on MacOS as the menu option is forced on. --- SFP_UI/Pages/SettingsPage.axaml | 9 ++++++--- SFP_UI/ViewModels/SettingsPageViewModel.cs | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) 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/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() { From 683b75f91c97ea2977fb76639ff98f3a855923d1 Mon Sep 17 00:00:00 2001 From: Yuki Walsh Date: Mon, 9 Feb 2026 18:36:45 +1100 Subject: [PATCH 7/8] prevent quitting the application by closing the window since it lives in the menu bar. --- SFP_UI/Views/MainWindow.axaml.cs | 4 ++++ 1 file changed, 4 insertions(+) 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; From 2121beab59a4e57cbf70fc8abf69e766d2f83017 Mon Sep 17 00:00:00 2001 From: Yuki Walsh Date: Mon, 9 Feb 2026 18:37:19 +1100 Subject: [PATCH 8/8] use OperatingSystem over RuntimeInformation for consistency. --- SFP_UI/App.axaml.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SFP_UI/App.axaml.cs b/SFP_UI/App.axaml.cs index 6647822..fa1b45e 100644 --- a/SFP_UI/App.axaml.cs +++ b/SFP_UI/App.axaml.cs @@ -4,7 +4,6 @@ using Avalonia.Controls; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; -using System.Runtime.InteropServices; using Avalonia.Styling; using Avalonia.Threading; @@ -54,7 +53,7 @@ public override async void OnFrameworkInitializationCompleted() return; } - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + if (OperatingSystem.IsMacOS()) { SetIconsState(true); }