Skip to content

Commit

Permalink
fix: better anti-aliasing on traffic-light icons
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed May 7, 2022
1 parent 55bbfe5 commit 022806b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/generic-components/TrafficLightButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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))
Expand Down

0 comments on commit 022806b

Please sign in to comment.