diff --git a/DockProgress.xcodeproj/project.pbxproj b/DockProgress.xcodeproj/project.pbxproj index 8426183..4b74a2a 100644 --- a/DockProgress.xcodeproj/project.pbxproj +++ b/DockProgress.xcodeproj/project.pbxproj @@ -312,7 +312,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = YES; GCC_OPTIMIZATION_LEVEL = 0; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 10.12; ONLY_ACTIVE_ARCH = YES; OTHER_SWIFT_FLAGS = "-DXcode"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -321,6 +321,7 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; USE_HEADERMAP = NO; + VALID_ARCHS = x86_64; }; name = Debug; }; @@ -377,7 +378,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_OPTIMIZATION_LEVEL = s; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 10.12; OTHER_SWIFT_FLAGS = "-DXcode"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -385,6 +386,7 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; USE_HEADERMAP = NO; + VALID_ARCHS = x86_64; }; name = Release; }; diff --git a/Package.swift b/Package.swift index c5aeb4c..27c18af 100644 --- a/Package.swift +++ b/Package.swift @@ -6,13 +6,15 @@ let package = Package( products: [ .library( name: "DockProgress", - targets: ["DockProgress"]), + targets: ["DockProgress"] + ) ], targets: [ .target( name: "DockProgress" .testTarget( name: "DockProgressTests", - dependencies: ["DockProgress"]), + dependencies: ["DockProgress"] + ) ] ) diff --git a/Sources/DockProgress/DockProgress.swift b/Sources/DockProgress/DockProgress.swift index bc2cd2e..083fed1 100644 --- a/Sources/DockProgress/DockProgress.swift +++ b/Sources/DockProgress/DockProgress.swift @@ -82,7 +82,7 @@ public final class DockProgress { roundedRect(barInnerBg) var barProgress = bar.insetBy(dx: 1, dy: 1) - barProgress.size.width = barProgress.width * CGFloat(self.progressValue) + barProgress.size.width = barProgress.width * CGFloat(progressValue) NSColor.white.set() roundedRect(barProgress) } diff --git a/readme.md b/readme.md index 6491e67..1b857e5 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ -This package is used in production by the [Gifski app](https://github.com/sindresorhus/gifski-app). +This package is used in production by the [Gifski app](https://github.com/sindresorhus/gifski-app). You might also like some of my [other apps](https://sindresorhus.com/#apps). ## Requirements @@ -28,6 +28,10 @@ With [Carthage](https://swift.org/package-manager/): github "sindresorhus/DockProgress" ``` + + + + ## Usage @@ -37,7 +41,7 @@ github "sindresorhus/DockProgress" import Cocoa import DockProgress -foo.onUpdate = { progress +foo.onUpdate = { progress in DockProgress.progressValue = progress } ```