diff --git a/SquirrelPanel.m b/SquirrelPanel.m index c7108f296..ff1fb7b0c 100644 --- a/SquirrelPanel.m +++ b/SquirrelPanel.m @@ -850,8 +850,6 @@ - (void)drawRect:(NSRect)dirtyRect { } CAShapeLayer *panelLayer = shapeFromPath(backPath); panelLayer.fillColor = theme.backgroundColor.CGColor; - panelLayer.lineWidth = theme.borderWidth; - panelLayer.strokeColor = theme.borderColor.CGColor; CAShapeLayer *panelLayerMask = shapeFromPath(backgroundPath); panelLayer.mask = panelLayerMask; [self.layer addSublayer: panelLayer]; @@ -867,6 +865,13 @@ - (void)drawRect:(NSRect)dirtyRect { layer.mask = mask; [panelLayer addSublayer: layer]; } + if (theme.borderWidth > 0 && theme.borderColor) { + CAShapeLayer *borderLayer = shapeFromPath(backgroundPath); + borderLayer.lineWidth = theme.borderWidth * 2; + borderLayer.strokeColor = theme.borderColor.CGColor; + borderLayer.fillColor = NULL; + [panelLayer addSublayer: borderLayer]; + } if (theme.highlightedPreeditColor && !CGPathIsEmpty(highlightedPreeditPath)) { CAShapeLayer *layer = shapeFromPath(highlightedPreeditPath); layer.fillColor = theme.highlightedPreeditColor.CGColor;