diff --git a/Timer/Assets.xcassets/Contents.json b/Timer/Assets.xcassets/Contents.json index da4a164..73c0059 100644 --- a/Timer/Assets.xcassets/Contents.json +++ b/Timer/Assets.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Timer/Assets.xcassets/Labels/Contents.json b/Timer/Assets.xcassets/Labels/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Timer/Assets.xcassets/Labels/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Timer/Assets.xcassets/Labels/minutes-label.colorset/Contents.json b/Timer/Assets.xcassets/Labels/minutes-label.colorset/Contents.json new file mode 100644 index 0000000..01992aa --- /dev/null +++ b/Timer/Assets.xcassets/Labels/minutes-label.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.271", + "green" : "0.255", + "red" : "0.235" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.645", + "green" : "0.645", + "red" : "0.645" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Timer/Assets.xcassets/Labels/seconds-label.colorset/Contents.json b/Timer/Assets.xcassets/Labels/seconds-label.colorset/Contents.json new file mode 100644 index 0000000..ac34b3b --- /dev/null +++ b/Timer/Assets.xcassets/Labels/seconds-label.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.686", + "green" : "0.667", + "red" : "0.635" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.533", + "green" : "0.520", + "red" : "0.497" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Timer/Assets.xcassets/Labels/timer-label.colorset/Contents.json b/Timer/Assets.xcassets/Labels/timer-label.colorset/Contents.json new file mode 100644 index 0000000..619920a --- /dev/null +++ b/Timer/Assets.xcassets/Labels/timer-label.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.012", + "green" : "0.141", + "red" : "0.749" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.485", + "green" : "0.626", + "red" : "0.745" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Timer/Assets.xcassets/clock-highlighted.imageset/Contents.json b/Timer/Assets.xcassets/clock-highlighted.imageset/Contents.json index 003e9e8..35fa749 100644 --- a/Timer/Assets.xcassets/clock-highlighted.imageset/Contents.json +++ b/Timer/Assets.xcassets/clock-highlighted.imageset/Contents.json @@ -1,23 +1,56 @@ { "images" : [ { - "idiom" : "universal", "filename" : "clock-highlighted.png", + "idiom" : "universal", "scale" : "1x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-highlighted-1.png", "idiom" : "universal", + "scale" : "1x" + }, + { "filename" : "clock-highlighted@2x.png", + "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-highlighted@2x-1.png", "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "clock-highlighted@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-highlighted@3x-1.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted-1.png b/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted-1.png new file mode 100644 index 0000000..7a46d26 Binary files /dev/null and b/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted-1.png differ diff --git a/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted@2x-1.png b/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted@2x-1.png new file mode 100644 index 0000000..f8c599a Binary files /dev/null and b/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted@2x-1.png differ diff --git a/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted@3x-1.png b/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted@3x-1.png new file mode 100644 index 0000000..bca5f07 Binary files /dev/null and b/Timer/Assets.xcassets/clock-highlighted.imageset/clock-highlighted@3x-1.png differ diff --git a/Timer/Assets.xcassets/clock-unfocus.imageset/Contents.json b/Timer/Assets.xcassets/clock-unfocus.imageset/Contents.json index dacfe57..b134d9f 100644 --- a/Timer/Assets.xcassets/clock-unfocus.imageset/Contents.json +++ b/Timer/Assets.xcassets/clock-unfocus.imageset/Contents.json @@ -1,23 +1,56 @@ { "images" : [ { - "idiom" : "universal", "filename" : "clock-unfocus.png", + "idiom" : "universal", "scale" : "1x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-unfocus-dark.png", "idiom" : "universal", + "scale" : "1x" + }, + { "filename" : "clock-unfocus@2x.png", + "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-unfocus-dark@2x.png", "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "clock-unfocus@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-unfocus-dark@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark.png b/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark.png new file mode 100644 index 0000000..cef9614 Binary files /dev/null and b/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark.png differ diff --git a/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark@2x.png b/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark@2x.png new file mode 100644 index 0000000..6158387 Binary files /dev/null and b/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark@2x.png differ diff --git a/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark@3x.png b/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark@3x.png new file mode 100644 index 0000000..ec17de5 Binary files /dev/null and b/Timer/Assets.xcassets/clock-unfocus.imageset/clock-unfocus-dark@3x.png differ diff --git a/Timer/Assets.xcassets/clock.imageset/Contents.json b/Timer/Assets.xcassets/clock.imageset/Contents.json index f88c080..16db03e 100644 --- a/Timer/Assets.xcassets/clock.imageset/Contents.json +++ b/Timer/Assets.xcassets/clock.imageset/Contents.json @@ -1,23 +1,56 @@ { "images" : [ { - "idiom" : "universal", "filename" : "clock.png", + "idiom" : "universal", "scale" : "1x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-dark.png", "idiom" : "universal", + "scale" : "1x" + }, + { "filename" : "clock@2x.png", + "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-dark@2x.png", "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "clock@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "clock-dark@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Timer/Assets.xcassets/clock.imageset/clock-dark.png b/Timer/Assets.xcassets/clock.imageset/clock-dark.png new file mode 100644 index 0000000..e9ddcbe Binary files /dev/null and b/Timer/Assets.xcassets/clock.imageset/clock-dark.png differ diff --git a/Timer/Assets.xcassets/clock.imageset/clock-dark@2x.png b/Timer/Assets.xcassets/clock.imageset/clock-dark@2x.png new file mode 100644 index 0000000..7f495c0 Binary files /dev/null and b/Timer/Assets.xcassets/clock.imageset/clock-dark@2x.png differ diff --git a/Timer/Assets.xcassets/clock.imageset/clock-dark@3x.png b/Timer/Assets.xcassets/clock.imageset/clock-dark@3x.png new file mode 100644 index 0000000..293a08d Binary files /dev/null and b/Timer/Assets.xcassets/clock.imageset/clock-dark@3x.png differ diff --git a/Timer/Assets.xcassets/icon-pause.imageset/Contents.json b/Timer/Assets.xcassets/icon-pause.imageset/Contents.json index cab3d76..680e784 100644 --- a/Timer/Assets.xcassets/icon-pause.imageset/Contents.json +++ b/Timer/Assets.xcassets/icon-pause.imageset/Contents.json @@ -1,23 +1,56 @@ { "images" : [ { - "idiom" : "universal", "filename" : "icon-pause.png", + "idiom" : "universal", "scale" : "1x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "icon-pause-dark.png", "idiom" : "universal", + "scale" : "1x" + }, + { "filename" : "icon-pause@2x.png", + "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "icon-pause-dark@2x.png", "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "icon-pause@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "icon-pause-dark@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark.png b/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark.png new file mode 100644 index 0000000..7963b51 Binary files /dev/null and b/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark.png differ diff --git a/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark@2x.png b/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark@2x.png new file mode 100644 index 0000000..fc87948 Binary files /dev/null and b/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark@2x.png differ diff --git a/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark@3x.png b/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark@3x.png new file mode 100644 index 0000000..fb452ee Binary files /dev/null and b/Timer/Assets.xcassets/icon-pause.imageset/icon-pause-dark@3x.png differ diff --git a/Timer/MVClockView.swift b/Timer/MVClockView.swift index 1f27d8e..46c8efb 100644 --- a/Timer/MVClockView.swift +++ b/Timer/MVClockView.swift @@ -97,14 +97,22 @@ class MVClockView: NSControl { timerTimeLabel = MVLabel(frame: NSRect(x: 0, y: 94, width: 150, height: 20)) timerTimeLabel.font = NSFont.systemFont(ofSize: timerTimeLabelFontSize, weight: .medium) timerTimeLabel.alignment = NSTextAlignment.center - timerTimeLabel.textColor = NSColor(srgbRed: 0.749, green: 0.1412, blue: 0.0118, alpha: 1.0) + if #available(macOS 10.13, *) { + timerTimeLabel.textColor = NSColor(named: "timer-label") + } else { + timerTimeLabel.textColor = NSColor(srgbRed: 0.749, green: 0.1412, blue: 0.0118, alpha: 1.0) + } self.addSubview(timerTimeLabel) minutesLabel = MVLabel(frame: NSRect(x: 0, y: 57, width: 150, height: 30)) minutesLabel.string = "" minutesLabel.font = NSFont.monospacedDigitSystemFont(ofSize: 35, weight: .medium) minutesLabel.alignment = NSTextAlignment.center - minutesLabel.textColor = NSColor(srgbRed: 0.2353, green: 0.2549, blue: 0.2706, alpha: 1.0) + if #available(macOS 10.13, *) { + minutesLabel.textColor = NSColor(named: "minutes-label") + } else { + minutesLabel.textColor = NSColor(srgbRed: 0.2353, green: 0.2549, blue: 0.2706, alpha: 1.0) + } self.addSubview(minutesLabel) let minutesLabelSuffix = "'" @@ -122,7 +130,11 @@ class MVClockView: NSControl { secondsLabel = MVLabel(frame: NSRect(x: 0, y: 38, width: 150, height: 20)) secondsLabel.font = NSFont.monospacedDigitSystemFont(ofSize: 15, weight: .regular) secondsLabel.alignment = NSTextAlignment.center - secondsLabel.textColor = NSColor(srgbRed: 0.6353, green: 0.6667, blue: 0.6863, alpha: 1.0) + if #available(OSX 10.13, *) { + secondsLabel.textColor = NSColor(named: "seconds-label") + } else { + secondsLabel.textColor = NSColor(srgbRed: 0.6353, green: 0.6667, blue: 0.6863, alpha: 1.0) + } self.addSubview(secondsLabel) let secondsLabelSuffix = "'"