         self.titleLayer.contentsScale = scale
         self.iconLayer.contentsScale = scale
     }
-    
-    public override func layer(_ layer: CALayer, shouldInheritContentsScale newScale: CGFloat,
-                               from window: NSWindow) -> Bool {
-        return true
-    }
 }
 

    private func setup() {
        self.wantsLayer = true
        self.layerContentsRedrawPolicy = .onSetNeedsDisplay
        
        self.layer?.delegate = self
        self.containerLayer.delegate = self
        self.titleLayer.delegate = self
        self.iconLayer.delegate = self
        
        self.layer?.masksToBounds = false
        self.containerLayer.masksToBounds = false
        self.titleLayer.masksToBounds = false
        self.iconLayer.masksToBounds = true
        
        self.iconLayer.mask = CALayer()
        self.iconLayer.mask?.contentsGravity = kCAGravityResizeAspect
        self.titleLayer.alignmentMode = kCAAlignmentCenter
        
        self.layer?.addSublayer(self.containerLayer)
        self.containerLayer.addSublayer(self.iconLayer)
        self.containerLayer.addSublayer(self.titleLayer)
        
        let trackingArea = NSTrackingArea(rect: bounds, options: [.activeAlways, .inVisibleRect, .mouseEnteredAndExited], owner: self, userInfo: nil)
        self.addTrackingArea(trackingArea)

        public var borderColor: NSColor
        public var shadow: NSShadow?
        public var bezelColor: NSColor
        public var rimOpacity: Float
        public var iconColor: NSColor
        public var textColor: NSColor
        public var duration: TimeInterval
        
        public init(cornerRadius: CGFloat = 0.0, borderWidth: CGFloat = 0.0, borderColor: NSColor = .clear,
                    shadow: NSShadow? = nil, bezelColor: NSColor = .clear, rimOpacity: Float = 0.0,
                    iconColor: NSColor = .clear, textColor: NSColor = .clear, duration: TimeInterval = 0.0)
        {
            self.cornerRadius = cornerRadius
            self.borderWidth = borderWidth
            self.borderColor = borderColor
            self.shadow = shadow
            self.bezelColor = bezelColor
            self.rimOpacity = rimOpacity
            self.iconColor = iconColor
            self.textColor = textColor
            self.duration = duration
        }
        
        public static let inactive = Properties(cornerRadius: 4.0, bezelColor: .darkGray,
                                                rimOpacity: 0.25, iconColor: .white,
                                                textColor: .white, duration: 0.5)
        public static let active = Properties(cornerRadius: 4.0, bezelColor: .white,
                                              rimOpacity: 0.25, iconColor: .darkGray,
                                              textColor: .darkGray, duration: 0.1)
    }
    
    private var containerLayer = CALayer()
    private var titleLayer = CATextLayer()
    private var iconLayer = CALayer()
    private var rimLayer = CALayer()
    
    public private(set) var isHovered = false {
        didSet { self.needsDisplay = true }
