this string has no description
NSColor+Pinstripes.swift edited
16 lines 591 B view raw
1static let pinstripePatternColor: NSColor = { 2 let stripeThickness = 1.5 3 let patternSize = CGSize(width: stripeThickness, height: stripeThickness * 3) 4 let image = NSImage( 5 size: patternSize, 6 flipped: false, 7 drawingHandler: { _ in 8 guard let context = NSGraphicsContext.current?.cgContext else { return false } 9 context.setFillColor(NSColor.separatorColor.withAlphaComponent(0.02).cgColor) 10 context.fill(CGRect(x: 0, y: stripeThickness, width: stripeThickness, height: stripeThickness)) 11 return true 12 } 13 ) 14 15 return NSColor(patternImage: image) 16}()