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

        self.iconLayer.frame = imageRect
        self.iconLayer.mask?.frame = self.iconLayer.bounds
        self.titleLayer.frame = titleRect
        if !initState {
            NSAnimationContext.endGrouping()
        }

        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 }
