diff --git a/Color Picker.xcodeproj/project.pbxproj b/Color Picker.xcodeproj/project.pbxproj index 781a70f..6abdea4 100644 --- a/Color Picker.xcodeproj/project.pbxproj +++ b/Color Picker.xcodeproj/project.pbxproj @@ -326,7 +326,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "swiftlint\n"; + shellScript = "PATH=\"/opt/homebrew/bin/:${PATH}\"\nswiftlint\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -661,7 +661,7 @@ repositoryURL = "https://github.com/sindresorhus/Defaults"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 6.3.0; + minimumVersion = 7.1.0; }; }; E3F4BC852788A5780075DC52 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { diff --git a/Color Picker/App.swift b/Color Picker/App.swift index e438a2b..6f7be94 100644 --- a/Color Picker/App.swift +++ b/Color Picker/App.swift @@ -1,5 +1,4 @@ import SwiftUI -import Defaults import LaunchAtLogin /** diff --git a/Color Picker/AppState.swift b/Color Picker/AppState.swift index 12d0a4e..b83cba1 100644 --- a/Color Picker/AppState.swift +++ b/Color Picker/AppState.swift @@ -1,6 +1,4 @@ import SwiftUI -import Combine -import Defaults import Sentry @MainActor diff --git a/Color Picker/ColorPanel.swift b/Color Picker/ColorPanel.swift index b816b6a..b8b7edd 100644 --- a/Color Picker/ColorPanel.swift +++ b/Color Picker/ColorPanel.swift @@ -1,5 +1,4 @@ import Cocoa -import Defaults @MainActor final class ColorPanel: NSColorPanel, NSWindowDelegate { diff --git a/Color Picker/ColorPickerScreen.swift b/Color Picker/ColorPickerScreen.swift index 0640278..cbc465d 100644 --- a/Color Picker/ColorPickerScreen.swift +++ b/Color Picker/ColorPickerScreen.swift @@ -1,5 +1,4 @@ import SwiftUI -import Defaults private struct RecentlyPickedColorsButton: View { @EnvironmentObject private var appState: AppState diff --git a/Color Picker/Constants.swift b/Color Picker/Constants.swift index 291cbff..88c5a25 100644 --- a/Color Picker/Constants.swift +++ b/Color Picker/Constants.swift @@ -1,5 +1,4 @@ import Cocoa -import Defaults import KeyboardShortcuts extension Defaults.Keys { diff --git a/Color Picker/Events.swift b/Color Picker/Events.swift index b5d2240..4d8941f 100644 --- a/Color Picker/Events.swift +++ b/Color Picker/Events.swift @@ -1,5 +1,4 @@ import SwiftUI -import Defaults import KeyboardShortcuts import LaunchAtLogin diff --git a/Color Picker/SettingsScreen.swift b/Color Picker/SettingsScreen.swift index f31cb4f..e19f7b6 100644 --- a/Color Picker/SettingsScreen.swift +++ b/Color Picker/SettingsScreen.swift @@ -1,5 +1,4 @@ import SwiftUI -import Defaults import LaunchAtLogin import KeyboardShortcuts @@ -29,6 +28,8 @@ private struct GeneralSettings: View { Defaults.Toggle("Stay on top", key: .stayOnTop) .help("Make the color picker window stay on top of all other windows.") .padding(.bottom, 8) + Defaults.Toggle("Copy color in preferred format after picking", key: .copyColorAfterPicking) + .padding(.bottom, 8) Defaults.Toggle("Show in menu bar instead of Dock", key: .showInMenuBar) .help("If you have “Keep in Dock” enabled when activating this setting, you should disable that since the Dock icon will no longer be functional.") Group { @@ -123,7 +124,6 @@ private struct AdvancedSettings: View { Form { Defaults.Toggle("Show color sampler when opening window", key: .showColorSamplerOnOpen) .help("Show the color picker loupe when the color picker window is shown.") - Defaults.Toggle("Copy color in preferred format after picking", key: .copyColorAfterPicking) Defaults.Toggle("Use larger text in text fields", key: .largerText) } .padding() diff --git a/Color Picker/Utilities.swift b/Color Picker/Utilities.swift index 9f4a905..e22048b 100644 --- a/Color Picker/Utilities.swift +++ b/Color Picker/Utilities.swift @@ -9,6 +9,10 @@ import Regex import Sentry #endif +typealias Defaults = _Defaults +typealias Default = _Default +typealias AnyCancellable = Combine.AnyCancellable + /* Non-reusable utilities */