Skip to content

Commit d870653

Browse files
Simone ManganelliSimone Manganelli
Simone Manganelli
authored and
Simone Manganelli
committed
made the Flash logo and the gear button more visible on dark backgrounds
1 parent ebe20e9 commit d870653

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Plugin/Plugin.m

+14-3
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
891891

892892
CGContextRef context = [ [ NSGraphicsContext currentContext ] graphicsPort ];
893893

894-
CGContextSetAlpha( context, pressed ? 0.40 : 0.25 );
894+
CGContextSetAlpha( context, pressed ? 0.50 : 0.35 );
895895
CGContextBeginTransparencyLayer( context, nil );
896896

897897
// Draw everything at full size, centered on the origin.
@@ -900,14 +900,25 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
900900
NSRect borderRect = NSMakeRect( loc.x - kFrameXInset, loc.y - kFrameYInset, w, h );
901901

902902
NSBezierPath* fillPath = bezierPathWithRoundedRectCornerRadius( NSInsetRect( borderRect, -2, -2 ), 6 );
903-
[ [ NSColor colorWithCalibratedWhite: 1.0 alpha: 0.25 ] set ];
903+
[ [ NSColor colorWithCalibratedWhite: 1.0 alpha: 0.45 ] set ];
904904
[ fillPath fill ];
905905

906+
NSUInteger thickLineWidth = 5;
906907
NSBezierPath* path = bezierPathWithRoundedRectCornerRadius( borderRect, 4 );
907908
[ [ NSColor blackColor ] set ];
908-
[ path setLineWidth: 3 ];
909+
[ path setLineWidth: thickLineWidth ];
909910
[ path stroke ];
910911

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+
911922
[ str drawAtPoint: loc withAttributes: attrs ];
912923

913924
// Now restore the graphics state:

0 commit comments

Comments
 (0)