diff --git a/Kit/Widgets/Tachometer.swift b/Kit/Widgets/Tachometer.swift index 41d78dc9..746e825c 100644 --- a/Kit/Widgets/Tachometer.swift +++ b/Kit/Widgets/Tachometer.swift @@ -13,6 +13,7 @@ import Cocoa public class Tachometer: WidgetWrapper { private var labelState: Bool = false + private var monochromeState: Bool = false private var chart: TachometerGraphView = TachometerGraphView( frame: NSRect( @@ -45,6 +46,7 @@ public class Tachometer: WidgetWrapper { ]) } else { self.labelState = Store.shared.bool(key: "\(self.title)_\(self.type.rawValue)_label", defaultValue: self.labelState) + self.monochromeState = Store.shared.bool(key: "\(self.title)_\(self.type.rawValue)_monochrome", defaultValue: self.monochromeState) } self.draw() @@ -69,7 +71,15 @@ public class Tachometer: WidgetWrapper { self.setWidth(self.size + x) } - public func setValue(_ segments: [circle_segment]) { + public func setValue(_ list: [circle_segment]) { + var segments = list + + if self.monochromeState { + for i in 0.. NSColor { + guard let space = CGColorSpace(name: CGColorSpace.extendedGray), + let cg = self.cgColor.converted(to: space, intent: .perceptual, options: nil), + let color = NSColor.init(cgColor: cg) else { + return self + } + return color + } } public extension CATransaction { diff --git a/Kit/plugins/Charts.swift b/Kit/plugins/Charts.swift index c665ffa0..b8032e02 100644 --- a/Kit/plugins/Charts.swift +++ b/Kit/plugins/Charts.swift @@ -22,7 +22,7 @@ public enum chart_t: Int { public struct circle_segment { public let value: Double - public let color: NSColor + public var color: NSColor public init(value: Double, color: NSColor) { self.value = value diff --git a/Stats/Supporting Files/pl.lproj/Localizable.strings b/Stats/Supporting Files/pl.lproj/Localizable.strings index e03de4a8..f53f57da 100644 --- a/Stats/Supporting Files/pl.lproj/Localizable.strings +++ b/Stats/Supporting Files/pl.lproj/Localizable.strings @@ -258,7 +258,7 @@ "Based on pressure" = "Na podstawie obciążenia"; "System accent" = "Akcent systemowy"; "Monochrome accent" = "Akcent monochromatyczny"; -"Clear" = "Wyczyść"; +"Clear" = "Przezroczysty"; "White" = "Biały"; "Black" = "Czarny"; "Gray" = "Szary";