diff --git a/Sources/AquaKit/Windows/AquaTrafficLightButton.swift b/Sources/AquaKit/Windows/AquaTrafficLightButton.swift index ed13c31..3022ecc 100644 --- a/Sources/AquaKit/Windows/AquaTrafficLightButton.swift +++ b/Sources/AquaKit/Windows/AquaTrafficLightButton.swift @@ -84,6 +84,9 @@ open class AquaTrafficLightButton: AquaWindowControlButton, AquaTrafficLightButt color = .graphiteColor.highlight(withLevel: 0.8)! NSGraphicsContext.current?.cgContext.setAlpha(0.4) } + if effectiveAppearance.isDarkAqua { + color = color.blended(withFraction: 0.5, of: .graphiteColor.shadow(withLevel: 0.9)!)! + } let strokeWidth = 1.0 let bounds = bounds diff --git a/Sources/AquaKit/Windows/AquaWindow.swift b/Sources/AquaKit/Windows/AquaWindow.swift index 4fbedaa..19a0cc9 100644 --- a/Sources/AquaKit/Windows/AquaWindow.swift +++ b/Sources/AquaKit/Windows/AquaWindow.swift @@ -52,19 +52,19 @@ open class AquaWindow: NSWindow { switch b { case .closeButton: let button = Self.trafficLightButtonClass.init(frame: frame) - button.baseColor = Self.windowCloseButtonBaseColor.graphiteShadedInDarkMode + button.baseColor = Self.windowCloseButtonBaseColor button.systemSymbolName = "xmark" button.action = #selector(close) return button case .miniaturizeButton: let button = Self.trafficLightButtonClass.init(frame: frame) - button.baseColor = Self.windowMiniaturizeButtonBaseColor.graphiteShadedInDarkMode + button.baseColor = Self.windowMiniaturizeButtonBaseColor button.systemSymbolName = "minus" button.action = #selector(miniaturize(_:)) return button case .zoomButton: let button = Self.trafficLightButtonClass.init(frame: frame) - button.baseColor = Self.windowZoomButtonBaseColor.graphiteShadedInDarkMode + button.baseColor = Self.windowZoomButtonBaseColor button.systemSymbolName = "plus" button.action = #selector(zoom(_:)) return button @@ -93,12 +93,3 @@ open class AquaWindow: NSWindow { } } } - - -extension NSColor { - fileprivate var graphiteShadedInDarkMode: NSColor { - modifyDark { - $0.blended(withFraction: 0.6, of: .graphiteColor.shadow(withLevel: 0.9)!)! - } - } -}