From 022806bea2fbbfc5cbbf300503a97ddc7b20563b Mon Sep 17 00:00:00 2001 From: Louis Pontoise Date: Sat, 7 May 2022 15:36:15 +0900 Subject: [PATCH] fix: better anti-aliasing on traffic-light icons --- src/ui/generic-components/TrafficLightButton.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/generic-components/TrafficLightButton.swift b/src/ui/generic-components/TrafficLightButton.swift index 82cedb2c..308620a9 100644 --- a/src/ui/generic-components/TrafficLightButton.swift +++ b/src/ui/generic-components/TrafficLightButton.swift @@ -132,6 +132,7 @@ class TrafficLightButton: NSButton { // symbol.move(to: NSMakePoint(bounds.width * 0.80, bounds.height / 2)) // symbol.line(to: NSMakePoint(bounds.width * 0.20, bounds.height / 2)) // symbol.lineWidth = 0.75 + // NSGraphicsContext.current?.shouldAntialias = true } else if (type == NSWindow.ButtonType.miniaturizeButton) { NSGraphicsContext.current?.shouldAntialias = false var symbol = NSBezierPath() @@ -140,6 +141,7 @@ class TrafficLightButton: NSButton { symbol.lineWidth = 0.75 lineColor.setStroke() symbol.stroke() + NSGraphicsContext.current?.shouldAntialias = true } else if (type == NSWindow.ButtonType.closeButton) { var symbol = NSBezierPath() symbol.move(to: NSMakePoint(bounds.width * 0.30, bounds.height * 0.30))