Minor tweaks
This commit is contained in:
parent
2fd7035c8c
commit
53a0ade4e9
|
@ -312,7 +312,7 @@
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
ENABLE_NS_ASSERTIONS = YES;
|
ENABLE_NS_ASSERTIONS = YES;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
OTHER_SWIFT_FLAGS = "-DXcode";
|
OTHER_SWIFT_FLAGS = "-DXcode";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
@ -321,6 +321,7 @@
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
USE_HEADERMAP = NO;
|
USE_HEADERMAP = NO;
|
||||||
|
VALID_ARCHS = x86_64;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
|
@ -377,7 +378,7 @@
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
GCC_OPTIMIZATION_LEVEL = s;
|
GCC_OPTIMIZATION_LEVEL = s;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||||
OTHER_SWIFT_FLAGS = "-DXcode";
|
OTHER_SWIFT_FLAGS = "-DXcode";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
|
@ -385,6 +386,7 @@
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
USE_HEADERMAP = NO;
|
USE_HEADERMAP = NO;
|
||||||
|
VALID_ARCHS = x86_64;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,13 +6,15 @@ let package = Package(
|
||||||
products: [
|
products: [
|
||||||
.library(
|
.library(
|
||||||
name: "DockProgress",
|
name: "DockProgress",
|
||||||
targets: ["DockProgress"]),
|
targets: ["DockProgress"]
|
||||||
|
)
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
.target(
|
.target(
|
||||||
name: "DockProgress"
|
name: "DockProgress"
|
||||||
.testTarget(
|
.testTarget(
|
||||||
name: "DockProgressTests",
|
name: "DockProgressTests",
|
||||||
dependencies: ["DockProgress"]),
|
dependencies: ["DockProgress"]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
|
@ -82,7 +82,7 @@ public final class DockProgress {
|
||||||
roundedRect(barInnerBg)
|
roundedRect(barInnerBg)
|
||||||
|
|
||||||
var barProgress = bar.insetBy(dx: 1, dy: 1)
|
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()
|
NSColor.white.set()
|
||||||
roundedRect(barProgress)
|
roundedRect(barProgress)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<img src="screenshot.gif" width="485">
|
<img src="screenshot.gif" width="485">
|
||||||
|
|
||||||
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
|
## Requirements
|
||||||
|
@ -28,6 +28,10 @@ With [Carthage](https://swift.org/package-manager/):
|
||||||
github "sindresorhus/DockProgress"
|
github "sindresorhus/DockProgress"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<a href="https://www.patreon.com/sindresorhus">
|
||||||
|
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -37,7 +41,7 @@ github "sindresorhus/DockProgress"
|
||||||
import Cocoa
|
import Cocoa
|
||||||
import DockProgress
|
import DockProgress
|
||||||
|
|
||||||
foo.onUpdate = { progress
|
foo.onUpdate = { progress in
|
||||||
DockProgress.progressValue = progress
|
DockProgress.progressValue = progress
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue