Skip to content

Commit

Permalink
Version 3.0 (#55)
Browse files Browse the repository at this point in the history
* Migrate to Xcode 15.2 (#52)

* Migrate

* Update to LastUpgradeCheck

* Fix collection view crash (#53)

* Migrate

* Update to LastUpgradeCheck

* Fix crash

* Refactor

* Show scroll in collectionView (#54)

* Fix localization typos (#56)

* Fix localization typos

* Fix localization

* Update to recommended settings (#57)

* Update settings

* Update

* Update Illustration (#59)

* Add TR localization (#49)

* Update missing strings

* Added Chinese translation support (#38) (#60)

Co-authored-by: Chuan Hu <51039745+GaiZhenbiao@users.noreply.github.com>

* Update README.md

* Fix DST (#61)

* Add new handling of timezones

* Fix timezones

* Fix spellings and grammar

* Remove dead code

* Fix linter

* Increase version to 3.0 (#62)

---------

Co-authored-by: Furkan İ <developer@furkanipek.com.tr>
Co-authored-by: Chuan Hu <51039745+GaiZhenbiao@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 18, 2024
1 parent bebd81d commit a420615
Show file tree
Hide file tree
Showing 67 changed files with 1,845 additions and 688 deletions.
39 changes: 28 additions & 11 deletions Equinox/Equinox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
F32F3778273AD25400A52762 /* WorkspaceRunner.swift in Sources */ = {isa = PBXBuildFile; fileRef = F32F3777273AD25400A52762 /* WorkspaceRunner.swift */; };
F337578A26BF533200310E72 /* SolarMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F337578926BF533200310E72 /* SolarMainViewController.swift */; };
F34E06D5267B86A700F004EF /* WallpaperMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F34E06D4267B86A700F004EF /* WallpaperMainViewController.swift */; };
F356C8B1272F78B500E915C6 /* SolarTimezoneController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F356C8B0272F78B500E915C6 /* SolarTimezoneController.swift */; };
F356C8B1272F78B500E915C6 /* SolarDateAndTimeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F356C8B0272F78B500E915C6 /* SolarDateAndTimeController.swift */; };
F356C8B32734B88D00E915C6 /* TipViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F356C8B22734B88D00E915C6 /* TipViewController.swift */; };
F356C8B92734C1FA00E915C6 /* TipContentViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F356C8B82734C1FA00E915C6 /* TipContentViewExtensions.swift */; };
F36AD5DA26E515C800314A02 /* WallpaperWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F36AD5D926E515C800314A02 /* WallpaperWindowController.swift */; };
Expand Down Expand Up @@ -78,9 +78,11 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
128D6B812973A88F00FD5677 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
3D8467CD2899BB0C00D19E32 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3D8467CF2899BCDA00D19E32 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3D916CE328B1682700D29FFF /* HelpMenuLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpMenuLinks.swift; sourceTree = "<group>"; };
E341F5472A9C8FBA007637CB /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F3003222213081F0008D1352 /* Equinox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Equinox.app; sourceTree = BUILT_PRODUCTS_DIR; };
F3003225213081F0008D1352 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
F300322C213081F0008D1352 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand All @@ -98,7 +100,7 @@
F32F3777273AD25400A52762 /* WorkspaceRunner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkspaceRunner.swift; sourceTree = "<group>"; };
F337578926BF533200310E72 /* SolarMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SolarMainViewController.swift; sourceTree = "<group>"; };
F34E06D4267B86A700F004EF /* WallpaperMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperMainViewController.swift; sourceTree = "<group>"; };
F356C8B0272F78B500E915C6 /* SolarTimezoneController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SolarTimezoneController.swift; sourceTree = "<group>"; };
F356C8B0272F78B500E915C6 /* SolarDateAndTimeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SolarDateAndTimeController.swift; sourceTree = "<group>"; };
F356C8B22734B88D00E915C6 /* TipViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipViewController.swift; sourceTree = "<group>"; };
F356C8B82734C1FA00E915C6 /* TipContentViewExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipContentViewExtensions.swift; sourceTree = "<group>"; };
F36AD5D926E515C800314A02 /* WallpaperWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperWindowController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -258,7 +260,7 @@
F36AD5DD26E51BCF00314A02 /* SolarWindowController.swift */,
F36AD5DF26E528C800314A02 /* SolarRootViewController.swift */,
F337578926BF533200310E72 /* SolarMainViewController.swift */,
F356C8B0272F78B500E915C6 /* SolarTimezoneController.swift */,
F356C8B0272F78B500E915C6 /* SolarDateAndTimeController.swift */,
);
path = Solar;
sourceTree = "<group>";
Expand Down Expand Up @@ -340,8 +342,9 @@
F300321A213081F0008D1352 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1300;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1520;
ORGANIZATIONNAME = rlxone;
TargetAttributes = {
F3003221213081F0008D1352 = {
Expand All @@ -363,6 +366,8 @@
en,
Base,
fr,
tr,
"zh-Hans",
);
mainGroup = F3003219213081F0008D1352;
packageReferences = (
Expand Down Expand Up @@ -441,7 +446,7 @@
F3837F0F2698FFA400671585 /* main.swift in Sources */,
F3E7B06026AE17E500287C60 /* AppearanceContentViewExtensions.swift in Sources */,
F329B3DE26F6838500A31035 /* WallpaperGalleryDataController.swift in Sources */,
F356C8B1272F78B500E915C6 /* SolarTimezoneController.swift in Sources */,
F356C8B1272F78B500E915C6 /* SolarDateAndTimeController.swift in Sources */,
F30C86DC26D6CEE600F93E60 /* WallpaperType.swift in Sources */,
3D916CE428B1682700D29FFF /* HelpMenuLinks.swift in Sources */,
F3E7B05E26ADE71100287C60 /* GalleryContentViewExtensions.swift in Sources */,
Expand Down Expand Up @@ -469,6 +474,8 @@
children = (
3D8467CD2899BB0C00D19E32 /* fr */,
3D8467CF2899BCDA00D19E32 /* en */,
E341F5472A9C8FBA007637CB /* tr */,
128D6B812973A88F00FD5677 /* zh-Hans */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
Expand All @@ -480,6 +487,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand All @@ -502,6 +510,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -510,10 +519,12 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2.0;
CURRENT_PROJECT_VERSION = 3.0;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -543,6 +554,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand All @@ -565,6 +577,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -573,10 +586,12 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2.0;
CURRENT_PROJECT_VERSION = 3.0;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down Expand Up @@ -604,15 +619,16 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Equinox/Resources/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 2.0;
MARKETING_VERSION = 3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.rlxone.equinox;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -629,15 +645,16 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Equinox/Resources/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 2.0;
MARKETING_VERSION = 3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.rlxone.equinox;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ extension GalleryCollectionButtonsView.Style {
primaryStyle: .init(
backgroundColor: Color.wallpaperPrimaryBackground,
alternativeColor: Color.controlAccent,
highlightColor: Color.controlAccent,
borderColor: Color.wallpaperButtonBorder
)
)
Expand Down
34 changes: 28 additions & 6 deletions Equinox/Equinox/Extensions/SolarContentViewExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,31 @@ extension SolarMainContentView.Style {
font: Font.title2(.bold),
color: Color.label
),
timelineStyle: .init(
font: Font.callout(.regular),
color: Color.label
timezoneAbbreviationStyle: .init(
ownStyle: .init(
backgroundColor: Color.solarContent,
borderColor: Color.solarContentBorder
),
titleStyle: .init(
font: Font.callout(.regular),
color: Color.label
)
),
timezoneDaylightSavingTimeStyle: .init(
ownStyle: .init(
backgroundColor: Color.solarContent,
borderColor: Color.solarContentBorder
),
titleStyle: .init(
font: Font.callout(.regular),
color: Color.label
)
),
timezoneMenuStyle: .init(
titleFont: Font.body(.regular),
titleColor: Color.label,
supplementaryTitleFont: Font.caption2(.regular),
supplementaryTitleColor: Color.secondaryLabel
)
),
resultStyle: .init(
Expand All @@ -111,12 +133,12 @@ extension SolarMainContentView.Style {
copyImage: Image.copy
),
pushButtonStyle: .default
),
pushButtonStyle: .default
)
),
lineStyle: .init(
color: Color.separator
)
),
tooltipStyle: .default
)
}
}
6 changes: 0 additions & 6 deletions Equinox/Equinox/Menu/MenuItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ final class MenuItem: NSMenuItem {
self.target = target
}

init(title string: String, submenuItems: [NSMenuItem]) {
super.init(title: string, action: nil, keyEquivalent: String())
self.submenu = NSMenu()
self.submenu?.items = submenuItems
}

required init(coder: NSCoder) {
super.init(coder: coder)
}
Expand Down
2 changes: 2 additions & 0 deletions Equinox/Equinox/Resources/tr.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NSHumanReadableCopyright = "Telif Hakkı © 2022 rlxone. Tüm hakları saklıdır.";
NSLocationUsageDescription = "Equinox, daha doğru güneş hesaplamaları yapmak için konumunuzu kullanmak istiyor";
2 changes: 2 additions & 0 deletions Equinox/Equinox/Resources/zh-Hans.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NSHumanReadableCopyright = "Copyright © 2022 rlxone. All rights reserved.";
NSLocationUsageDescription = "Equinox wants to use your location for making more correct solar calculations";
11 changes: 3 additions & 8 deletions Equinox/Equinox/Stories/Common/ImageProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ protocol ImageProvider {
resizeMode: ImageResizeMode,
completion: @escaping (NSImage?) -> Void
)
func removeCachedImage(_ url: URL)
func validateImages(_ urls: [URL], imageFormat: [ImageFormatType]) -> [URL]
func validateImages(_ urls: [URL]) -> [URL]
func getImageMetadata(for url: URL) -> ExifMetadata?
}

Expand Down Expand Up @@ -113,14 +112,10 @@ final class ImageProviderImpl: ImageProvider {
}
}

func removeCachedImage(_ url: URL) {
imageService.removeCachedImage(url: url)
}

func validateImages(_ urls: [URL], imageFormat: [ImageFormatType]) -> [URL] {
func validateImages(_ urls: [URL]) -> [URL] {
var preparedUrls: [URL] = []

for url in urls where imageService.validateImage(url: url, imageFormat: imageFormat) {
for url in urls where imageService.validateImage(url: url, imageFormat: ImageFormatType.allCases) {
preparedUrls.append(url)
}

Expand Down
11 changes: 0 additions & 11 deletions Equinox/Equinox/Stories/Common/NavigationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,10 @@ import Foundation
// MARK: - Enums, Structs

extension NavigationController {
private class ControlState {
let isEnabled: Bool

init(isEnabled: Bool) {
self.isEnabled = isEnabled
}
}

private enum Constants {
static let defaultAnimationTimeInterval: TimeInterval = 0.35
static let pushAnimationPreviousShiftAspect: CGFloat = 3
static let pushAnimationPreviousAlpha: CGFloat = 0.3
static let presentScaleAnimationTimeInterval: TimeInterval = 0.25
static let dismissScaleAnimationTimeInterval: TimeInterval = 0.2
static let dismissAnimationTimeInterval: TimeInterval = 0.25
}
}
Expand All @@ -55,7 +45,6 @@ extension NavigationController {

class NavigationController: ViewController {
private var rootViewController: ViewController
private var controlsState = NSMapTable<NSView, ControlState>(keyOptions: [.weakMemory])

// MARK: - Initializer

Expand Down
9 changes: 0 additions & 9 deletions Equinox/Equinox/Stories/Common/WorkspaceRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,4 @@ enum WorkspaceRunner {

return output
}

static func launchApplication(bundleIndentifier: String, options: NSWorkspace.LaunchOptions) {
NSWorkspace.shared.launchApplication(
withBundleIdentifier: bundleIndentifier,
options: options,
additionalEventParamDescriptor: nil,
launchIdentifier: nil
)
}
}
Loading

0 comments on commit a420615

Please sign in to comment.