Skip to content

Commit 00a3911

Browse files
committed
[CHANGE] Eliminate stray thin gray line along outside light border.
1 parent e84a62a commit 00a3911

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

Plugin/Plugin.m

+14-20
Original file line numberDiff line numberDiff line change
@@ -899,26 +899,20 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
899899
NSPoint loc = { -strSize.width / 2, -strSize.height / 2 };
900900
NSRect borderRect = NSMakeRect( loc.x - kFrameXInset, loc.y - kFrameYInset, w, h );
901901

902-
NSBezierPath* fillPath = bezierPathWithRoundedRectCornerRadius( NSInsetRect( borderRect, -2, -2 ), 6 );
903-
[ [ NSColor colorWithCalibratedWhite: 1.0 alpha: 0.45 ] set ];
904-
[ fillPath fill ];
905-
906-
NSUInteger thickLineWidth = 5;
907-
NSBezierPath* path = bezierPathWithRoundedRectCornerRadius( borderRect, 4 );
908-
[ [ NSColor blackColor ] set ];
909-
[ path setLineWidth: thickLineWidth ];
910-
[ path stroke ];
911-
912-
NSUInteger thinLineWidth = 2;
913-
NSRect thinBorderRect = NSMakeRect( loc.x - kFrameXInset - thickLineWidth/4,
914-
loc.y - kFrameYInset - thickLineWidth/4,
915-
w + thickLineWidth/2,
916-
h + thickLineWidth/2);
917-
NSBezierPath* thinPath = bezierPathWithRoundedRectCornerRadius( thinBorderRect, 4 );
918-
[ [ NSColor whiteColor ] set ];
919-
[ thinPath setLineWidth: thinLineWidth ];
920-
[ thinPath stroke ];
921-
902+
NSBezierPath* fillPath = bezierPathWithRoundedRectCornerRadius( borderRect, 4 );
903+
[ [ NSColor colorWithCalibratedWhite: 1.0 alpha: 0.45 ] set ];
904+
[ fillPath fill ];
905+
906+
NSBezierPath* darkBorderPath = bezierPathWithRoundedRectCornerRadius( borderRect, 4 );
907+
[[NSColor blackColor] set];
908+
[ darkBorderPath setLineWidth: 3 ];
909+
[ darkBorderPath stroke ];
910+
911+
NSBezierPath* lightBorderPath = bezierPathWithRoundedRectCornerRadius( NSInsetRect(borderRect, -2, -2), 6 );
912+
[ [ NSColor colorWithCalibratedWhite: 1.0 alpha: 0.45 ] set ];
913+
[ lightBorderPath setLineWidth: 2 ];
914+
[ lightBorderPath stroke ];
915+
922916
[ str drawAtPoint: loc withAttributes: attrs ];
923917

924918
// Now restore the graphics state:

0 commit comments

Comments
 (0)