diff --git a/ChuanhuWallpaper.xcodeproj/project.pbxproj b/ChuanhuWallpaper.xcodeproj/project.pbxproj index 8f7998c..46c9c5c 100644 --- a/ChuanhuWallpaper.xcodeproj/project.pbxproj +++ b/ChuanhuWallpaper.xcodeproj/project.pbxproj @@ -422,7 +422,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_ASSET_PATHS = "\"ChuanhuWallpaper/Preview Content\""; DEVELOPMENT_TEAM = KWS26AWJ45; ENABLE_HARDENED_RUNTIME = YES; @@ -435,7 +435,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 2.0; + MARKETING_VERSION = 2.1.1; PRODUCT_BUNDLE_IDENTIFIER = com.tuchuanhuhuhu.ChuanhuWallpaper; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -452,7 +452,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_ASSET_PATHS = "\"ChuanhuWallpaper/Preview Content\""; DEVELOPMENT_TEAM = KWS26AWJ45; ENABLE_HARDENED_RUNTIME = YES; @@ -465,7 +465,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 2.0; + MARKETING_VERSION = 2.1.1; PRODUCT_BUNDLE_IDENTIFIER = com.tuchuanhuhuhu.ChuanhuWallpaper; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/ChuanhuWallpaper/Components/SaveButton.swift b/ChuanhuWallpaper/Components/SaveButton.swift index 434a19a..e86f11c 100644 --- a/ChuanhuWallpaper/Components/SaveButton.swift +++ b/ChuanhuWallpaper/Components/SaveButton.swift @@ -30,12 +30,17 @@ struct SaveButton: View { private func save() { var pictureInfos: [PictureInfo] = [] + var info: PictureInfo for wallpaper in wallpapers { // Skip wallpapers which are not for light or dark mode when current mode is appearance. - if mode == .appearance && wallpaper.isFor == .none { - continue + if mode == .appearance { + if wallpaper.isFor == .none { + continue + } + info = PictureInfo(fileName: wallpaper.filePath.path, isPrimary: wallpaper.isPrimary, isForLight: wallpaper.isFor == .light, isForDark: wallpaper.isFor == .dark, altitude: nil, azimuth: nil) + } else { + info = PictureInfo(fileName: wallpaper.filePath.path, isPrimary: wallpaper.isPrimary, isForLight: wallpaper.isFor == .light, isForDark: wallpaper.isFor == .dark, altitude: wallpaper.altitude, azimuth: wallpaper.azimuth) } - let info = PictureInfo(fileName: wallpaper.filePath.path, isPrimary: wallpaper.isPrimary, isForLight: wallpaper.isFor == .light, isForDark: wallpaper.isFor == .dark, altitude: wallpaper.altitude, azimuth: wallpaper.azimuth) pictureInfos.append(info) } if let outputFileName = showSavePanel() { diff --git a/ChuanhuWallpaper/Components/WallpaperCell.swift b/ChuanhuWallpaper/Components/WallpaperCell.swift index 0e20afb..944032e 100644 --- a/ChuanhuWallpaper/Components/WallpaperCell.swift +++ b/ChuanhuWallpaper/Components/WallpaperCell.swift @@ -72,7 +72,7 @@ struct WallpaperCell: View { .frame(maxWidth: 150, maxHeight: .infinity) .padding(10) .background( - Color.white + Color.backgroud .opacity(0.5) .overlay( RoundedRectangle(cornerRadius: 8)