Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion SFP_UI/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
9 changes: 6 additions & 3 deletions SFP_UI/Pages/SettingsPage.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
<StackPanel Orientation="Vertical">
<TextBlock FontSize="16" FontWeight="DemiBold" Text="App" Margin="0 10 0 10" />
<CheckBox IsChecked="{Binding CheckForUpdates}">Check for updates on startup</CheckBox>
<CheckBox IsChecked="{Binding ShowTrayIcon}">Show tray icon</CheckBox>
<CheckBox IsChecked="{Binding MinimizeToTray}">Minimize to tray</CheckBox>
<CheckBox IsChecked="{Binding CloseToTray}">Close to tray</CheckBox>
<CheckBox IsChecked="{Binding ShowTrayIcon}" IsVisible="{Binding !IsMacOs}">Show
tray icon</CheckBox>
<CheckBox IsChecked="{Binding MinimizeToTray}" IsVisible="{Binding !IsMacOs}">Minimize
to tray</CheckBox>
<CheckBox IsChecked="{Binding CloseToTray}" IsVisible="{Binding !IsMacOs}">Close to
tray</CheckBox>
<CheckBox IsChecked="{Binding StartMinimized}">Start minimized</CheckBox>
<CheckBox IsChecked="{Binding InjectOnAppStart}">Inject on app start</CheckBox>
<CheckBox IsChecked="{Binding RunSteamOnStart}">Run Steam on start</CheckBox>
Expand Down
3 changes: 2 additions & 1 deletion SFP_UI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions SFP_UI/ViewModels/SettingsPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public partial class SettingsPageViewModel : ViewModelBase
#endregion

public bool IsWindows { get; } = OperatingSystem.IsWindows();
public bool IsMacOs { get; } = OperatingSystem.IsMacOS();

public SettingsPageViewModel()
{
Expand Down
4 changes: 4 additions & 0 deletions SFP_UI/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ protected override async void OnClosing(WindowClosingEventArgs e)
return;
}
Instance = null;
if (OperatingSystem.IsMacOS())
{
return;
}
if (Settings.Default.CloseToTray)
{
return;
Expand Down