Update: New implementation replaces windowResizability to adapt to macOS 12.0+ (Maybe).

This commit is contained in:
X1a0He
2024-11-08 22:26:19 +08:00
parent 186297bf05
commit 889755493b
2 changed files with 13 additions and 3 deletions

View File

@@ -299,7 +299,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.x1a0he.macOS.Adobe-Downloader";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -331,7 +331,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.x1a0he.macOS.Adobe-Downloader";
PRODUCT_NAME = "$(TARGET_NAME)";

View File

@@ -172,7 +172,7 @@ struct Adobe_DownloaderApp: App {
}
}
.windowStyle(.hiddenTitleBar)
.windowResizability(.contentSize)
.windowResizabilityContentSize()
.commands {
CommandGroup(after: .appInfo) {
CheckForUpdatesView(updater: updaterController.updater)
@@ -213,3 +213,13 @@ struct Adobe_DownloaderApp: App {
AppStatics.supportedLanguages.first { $0.code == code }?.name ?? code
}
}
extension Scene {
func windowResizabilityContentSize() -> some Scene {
if #available(macOS 13.0, *) {
return windowResizability(.contentSize)
} else {
return self
}
}
}