From b9a55ccbce1b95913094b44bf6538d8d806556f6 Mon Sep 17 00:00:00 2001 From: Kofua <1638183271zjn@gmail.com> Date: Sun, 14 Sep 2025 18:14:19 +0800 Subject: [PATCH] Some tweaks for macOS target (#1260) * fix macOS save video cover * not hide title bar for macOS --- lib/main.dart | 10 ++++------ macos/Runner/DebugProfile.entitlements | 2 ++ macos/Runner/Release.entitlements | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 439306e4f..3e5f97fb0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -78,14 +78,12 @@ void main() async { ); } else if (Utils.isDesktop) { await windowManager.ensureInitialized(); - WindowOptions windowOptions = WindowOptions( - minimumSize: const Size(400, 720), - size: const Size(1180, 720), + WindowOptions windowOptions = const WindowOptions( + minimumSize: Size(400, 720), + size: Size(1180, 720), center: true, skipTaskbar: false, - titleBarStyle: Platform.isMacOS - ? TitleBarStyle.hidden - : TitleBarStyle.normal, + titleBarStyle: TitleBarStyle.normal, title: Constants.appName, ); windowManager.waitUntilReadyToShow(windowOptions, () async { diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index 08c3ab17c..0ed500f41 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -10,5 +10,7 @@ com.apple.security.network.client + com.apple.security.files.user-selected.read-write + diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index ee95ab7e5..a7144750e 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -6,5 +6,7 @@ com.apple.security.network.client + com.apple.security.files.user-selected.read-write +