Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 12, 2022
1 parent ba1c78c commit 656418d
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Color Picker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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" */ = {
Expand Down
1 change: 0 additions & 1 deletion Color Picker/App.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import SwiftUI
import Defaults
import LaunchAtLogin

/**
Expand Down
2 changes: 0 additions & 2 deletions Color Picker/AppState.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import SwiftUI
import Combine
import Defaults
import Sentry

@MainActor
Expand Down
1 change: 0 additions & 1 deletion Color Picker/ColorPanel.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Cocoa
import Defaults

@MainActor
final class ColorPanel: NSColorPanel, NSWindowDelegate {
Expand Down
1 change: 0 additions & 1 deletion Color Picker/ColorPickerScreen.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import SwiftUI
import Defaults

private struct RecentlyPickedColorsButton: View {
@EnvironmentObject private var appState: AppState
Expand Down
1 change: 0 additions & 1 deletion Color Picker/Constants.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Cocoa
import Defaults
import KeyboardShortcuts

extension Defaults.Keys {
Expand Down
1 change: 0 additions & 1 deletion Color Picker/Events.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import SwiftUI
import Defaults
import KeyboardShortcuts
import LaunchAtLogin

Expand Down
4 changes: 2 additions & 2 deletions Color Picker/SettingsScreen.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import SwiftUI
import Defaults
import LaunchAtLogin
import KeyboardShortcuts

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions Color Picker/Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import Regex
import Sentry
#endif

typealias Defaults = _Defaults
typealias Default = _Default
typealias AnyCancellable = Combine.AnyCancellable

/*
Non-reusable utilities
*/
Expand Down

0 comments on commit 656418d

Please sign in to comment.