     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.rimLayer.masksToBounds = false
         
         self.iconLayer.mask = CALayer()
         self.iconLayer.mask?.contentsGravity = kCAGravityResizeAspect
         self.titleLayer.alignmentMode = kCAAlignmentCenter
+        self.rimLayer.borderColor = .black
+        self.rimLayer.borderWidth = 0.5
         
         self.layer?.addSublayer(self.containerLayer)
         self.containerLayer.addSublayer(self.iconLayer)
         self.containerLayer.addSublayer(self.titleLayer)
+        self.layer?.addSublayer(self.rimLayer)
         
         let trackingArea = NSTrackingArea(rect: bounds, options: [.activeAlways, .inVisibleRect, .mouseEnteredAndExited], owner: self, userInfo: nil)
         self.addTrackingArea(trackingArea)

        self.layer?.borderColor = props.borderColor.cgColor
        self.layer?.backgroundColor = props.bezelColor.cgColor
        
        self.shadow = props.shadow // does the equivalent of the below:
        /*
        self.layer?.shadowOpacity = Float(props.shadow?.shadowColor?.alphaComponent ?? 0.0)
        self.layer?.shadowOffset = props.shadow?.shadowOffset ?? .zero
        self.layer?.shadowColor = props.shadow?.shadowColor?.withAlphaComponent(1.0).cgColor ?? .clear
        self.layer?.shadowRadius = props.shadow?.shadowBlurRadius ?? 0.0
        */
        
        self.iconLayer.backgroundColor = props.iconColor.cgColor
        self.titleLayer.foregroundColor = props.textColor.cgColor

        self.iconLayer.frame = imageRect
        self.iconLayer.mask?.frame = self.iconLayer.bounds
        self.titleLayer.frame = titleRect
        self.rimLayer.frame = self.layer?.bounds.insetBy(dx: -0.5, dy: -0.5) ?? .zero
        if !initState {
            NSAnimationContext.endGrouping()
        }
