fix: better anti-aliasing on traffic-light icons

This commit is contained in:
Louis Pontoise committed 2022-05-07 18:06:09 +09:00
1 parent 55bbfe59e6
commit 022806bea2
1 file changed
+2
@@ -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))