Skip to content

Commit 189b45f

Browse files
committed
1.13.0
1 parent be6c837 commit 189b45f

File tree

8 files changed

+46
-29
lines changed

8 files changed

+46
-29
lines changed

Diff for: Color Picker.xcodeproj/project.pbxproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,9 @@
233233
E3A3B11125904E7B001B4D0C /* Project object */ = {
234234
isa = PBXProject;
235235
attributes = {
236+
BuildIndependentTargetsInParallel = YES;
236237
LastSwiftUpdateCheck = 1420;
237-
LastUpgradeCheck = 1400;
238+
LastUpgradeCheck = 1430;
238239
TargetAttributes = {
239240
E34BFA932988F3AF002AB421 = {
240241
CreatedOnToolsVersion = 14.2;
@@ -456,7 +457,7 @@
456457
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
457458
GCC_WARN_UNUSED_FUNCTION = YES;
458459
GCC_WARN_UNUSED_VARIABLE = YES;
459-
MACOSX_DEPLOYMENT_TARGET = 13.1;
460+
MACOSX_DEPLOYMENT_TARGET = 13.3;
460461
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
461462
MTL_FAST_MATH = YES;
462463
ONLY_ACTIVE_ARCH = YES;
@@ -514,7 +515,7 @@
514515
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
515516
GCC_WARN_UNUSED_FUNCTION = YES;
516517
GCC_WARN_UNUSED_VARIABLE = YES;
517-
MACOSX_DEPLOYMENT_TARGET = 13.1;
518+
MACOSX_DEPLOYMENT_TARGET = 13.3;
518519
MTL_ENABLE_DEBUG_INFO = NO;
519520
MTL_FAST_MATH = YES;
520521
SDKROOT = macosx;

Diff for: Color Picker.xcodeproj/xcshareddata/xcschemes/Color Picker.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1400"
3+
LastUpgradeVersion = "1430"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Diff for: Color Picker/App.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,7 @@ struct AppMain: App {
8080
}
8181

8282
private func setUpConfig() {
83-
#if !DEBUG
84-
SentrySDK.start {
85-
$0.dsn = "https://[email protected]/6139060"
86-
$0.enableSwizzling = false
87-
$0.enableAppHangTracking = false // https://github.com/getsentry/sentry-cocoa/issues/2643
88-
}
89-
#endif
83+
SSApp.initSentry("https://[email protected]/6139060")
9084
}
9185
}
9286

Diff for: Color Picker/AppState.swift

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import SwiftUI
2-
import Sentry
32

43
@MainActor
54
final class AppState: ObservableObject {

Diff for: Color Picker/Events.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ extension AppState {
99
.sink { [self] in
1010
// We only set the state if it's in Dock mode or menu bar mode showing the icon.
1111
if !$0.newValue || ($0.newValue && !Defaults[.hideMenuBarIcon]) {
12-
self.statusItem.isVisible = $0.newValue
12+
statusItem.isVisible = $0.newValue
1313
}
1414

1515
SSApp.isDockIconVisible = !$0.newValue
1616
NSApp.activate(ignoringOtherApps: true)
1717

1818
if !$0.newValue {
1919
LaunchAtLogin.isEnabled = false
20-
self.colorPanel.makeKeyAndOrderFront(nil)
20+
colorPanel.makeKeyAndOrderFront(nil)
2121
}
2222
}
2323
.store(in: &cancellables)

Diff for: Color Picker/Utilities.swift

+27-11
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,22 @@ extension SSApp {
218218
}
219219

220220

221+
extension SSApp {
222+
/**
223+
Initialize Sentry.
224+
*/
225+
static func initSentry(_ dsn: String) {
226+
#if !DEBUG && canImport(Sentry)
227+
SentrySDK.start {
228+
$0.dsn = dsn
229+
$0.enableSwizzling = false
230+
$0.enableAppHangTracking = false // https://github.com/getsentry/sentry-cocoa/issues/2643
231+
}
232+
#endif
233+
}
234+
}
235+
236+
221237
enum Device {
222238
static let osVersion: String = {
223239
let os = ProcessInfo.processInfo.operatingSystemVersion
@@ -409,9 +425,9 @@ final class LocalEventMonitor: ObservableObject {
409425
return event
410426
}
411427

412-
self.objectWillChange.send(event)
428+
objectWillChange.send(event)
413429

414-
if let callback = self.callback {
430+
if let callback {
415431
return callback(event)
416432
}
417433

@@ -1042,7 +1058,7 @@ struct NativeTextField: NSViewRepresentable {
10421058
return
10431059
}
10441060

1045-
self.unfocus()
1061+
unfocus()
10461062
}.start()
10471063

10481064
// Cannot be `.leftMouseUp` as the color wheel swallows it.
@@ -1059,14 +1075,14 @@ struct NativeTextField: NSViewRepresentable {
10591075
return event
10601076
}
10611077

1062-
let clickPoint = self.convert(event.locationInWindow, from: nil)
1078+
let clickPoint = convert(event.locationInWindow, from: nil)
10631079
let clickMargin = 3.0
10641080

1065-
if !self.frame.insetBy(dx: -clickMargin, dy: -clickMargin).contains(clickPoint) {
1066-
self.unfocus()
1081+
if !frame.insetBy(dx: -clickMargin, dy: -clickMargin).contains(clickPoint) {
1082+
unfocus()
10671083
return nil
10681084
} else {
1069-
self.parent.isFocused = true
1085+
parent.isFocused = true
10701086
}
10711087

10721088
return event
@@ -1321,7 +1337,7 @@ extension ControlActionClosureProtocol {
13211337

13221338
let trampoline = ActionTrampoline(action: newValue)
13231339
target = trampoline
1324-
self.action = #selector(ActionTrampoline.handleAction)
1340+
action = #selector(ActionTrampoline.handleAction)
13251341
objc_setAssociatedObject(self, &controlActionClosureProtocolAssociatedObjectKey, trampoline, .OBJC_ASSOCIATION_RETAIN)
13261342
}
13271343
}
@@ -1773,9 +1789,9 @@ extension NSPasteboard {
17731789
}
17741790

17751791
if isActive {
1776-
self.start()
1792+
start()
17771793
} else {
1778-
self.stop()
1794+
stop()
17791795
}
17801796
}
17811797
.store(in: &cancellables)
@@ -2367,7 +2383,7 @@ extension Binding where Value: SetAlgebra, Value.Element: Hashable {
23672383
}
23682384
```
23692385
*/
2370-
func contains<T>(_ element: T) -> Binding<Bool> where T == Value.Element {
2386+
func contains(_ element: Value.Element) -> Binding<Bool> {
23712387
.init(
23722388
get: { wrappedValue.contains(element) },
23732389
set: {

Diff for: Config.xcconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
MARKETING_VERSION = 1.12.1
2-
CURRENT_PROJECT_VERSION = 34
1+
MARKETING_VERSION = 1.13.0
2+
CURRENT_PROJECT_VERSION = 36

Diff for: readme.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,18 @@ The macOS color picker as an app with lots of extra features.
1717

1818
[![](https://tools.applemediaservices.com/api/badges/download-on-the-mac-app-store/black/en-us?size=250x83&releaseDate=1615852800)](https://apps.apple.com/app/id1545870783)
1919

20-
Requires macOS 12 or later.
20+
Requires macOS 13 or later.
2121

2222
**Older versions**
2323

24-
- [Last macOS 11 compatible version](https://github.com/sindresorhus/System-Color-Picker/releases/download/v1.9.6/Color.Picker.1.9.6.-.macOS.11.zip) *(1.9.6)*
24+
- [1.12.1](https://github.com/sindresorhus/System-Color-Picker/releases/download/v1.12.1/Color.Picker.1.12.1.-.macOS.12.zip) for macOS 12+
25+
- [1.9.6](https://github.com/sindresorhus/System-Color-Picker/releases/download/v1.9.6/Color.Picker.1.9.6.-.macOS.11.zip) for macOS 11+
26+
27+
**Non-App Store version**
28+
29+
A special version for users that cannot access the App Store. It won't receive updates.
30+
31+
[Download](https://dsc.cloud/sindresorhus/Color-Picker-1.13.0-1679983870.zip) *(1.13.0 · macOS 13+)*
2532

2633
## Features
2734

0 commit comments

Comments
 (0)