Skip to content

A Swiss Army knife for developers.

Fixed some mac-specific issues

Etienne Baudoux498b0585bda7
diff --git a/src/app/dev/DevToys.Core/OSHelper.cs b/src/app/dev/DevToys.Core/OSHelper.cs
index edad7a194..4607d8cd4 100644
--- a/src/app/dev/DevToys.Core/OSHelper.cs
+++ b/src/app/dev/DevToys.Core/OSHelper.cs
@@ -10,22 +10,22 @@ public static class OSHelper
if (targetPlatforms.Count > 0)
{
Platform currentPlatform;
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ if (OperatingSystem.IsBrowser())
+ {
+ currentPlatform = Platform.WASM;
+ }
+ else if (OperatingSystem.IsMacOS() || OperatingSystem.IsMacCatalyst())
{
currentPlatform = Platform.MacCatalyst;
}
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ else if (OperatingSystem.IsWindows())
{
currentPlatform = Platform.Windows;
}
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD))
+ else if (OperatingSystem.IsLinux() || OperatingSystem.IsFreeBSD())
{
currentPlatform = Platform.Linux;
}
- else if (OperatingSystem.IsBrowser())
- {
- currentPlatform = Platform.WASM;
- }
else
{
ThrowHelper.ThrowPlatformNotSupportedException();
diff --git a/src/app/dev/DevToys.UI.Framework/Controls/BackdropWindow/BackdropWindow.MacCatalyst.cs b/src/app/dev/DevToys.UI.Framework/Controls/BackdropWindow/BackdropWindow.MacCatalyst.cs
index 70ea14fa2..3a5c9d994 100644
--- a/src/app/dev/DevToys.UI.Framework/Controls/BackdropWindow/BackdropWindow.MacCatalyst.cs
+++ b/src/app/dev/DevToys.UI.Framework/Controls/BackdropWindow/BackdropWindow.MacCatalyst.cs
@@ -57,6 +57,7 @@ public sealed partial class BackdropWindow
public partial bool IsInCompactOverlayMode()
{
// throw new NotImplementedException(); // TODO.
+ return false;
}
public partial void TryToggleCompactOverlayMode()
diff --git a/src/app/dev/DevToys.UI/Views/MainWindow.xaml b/src/app/dev/DevToys.UI/Views/MainWindow.xaml
index 95509122c..8ca2be28f 100644
--- a/src/app/dev/DevToys.UI/Views/MainWindow.xaml
+++ b/src/app/dev/DevToys.UI/Views/MainWindow.xaml
@@ -64,7 +64,7 @@
</VisualStateManager.VisualStateGroups>
<Grid.BackgroundTransition>
- <BrushTransition />
+ <win:BrushTransition />
</Grid.BackgroundTransition>
<!-- App title bar, including Draggable area of the title bar and buttons. -->
diff --git a/src/app/dev/platforms/desktop/DevToys.MauiBlazor/MauiProgram.cs b/src/app/dev/platforms/desktop/DevToys.MauiBlazor/MauiProgram.cs
index 1af8d7ead..c1ba636b2 100644
--- a/src/app/dev/platforms/desktop/DevToys.MauiBlazor/MauiProgram.cs
+++ b/src/app/dev/platforms/desktop/DevToys.MauiBlazor/MauiProgram.cs
@@ -10,6 +10,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.Fast.Components.FluentUI;
using Microsoft.Fast.Components.FluentUI.Infrastructure;
using Uno.Extensions;
+using PredefinedSettings = DevToys.Core.Settings.PredefinedSettings;
namespace DevToys.MauiBlazor;