Permalink
Browse files

made the Flash logo and the gear button more visible on dark backgrounds

  • Loading branch information...
1 parent 7d001bb commit 760a8895eb2254365dc29ada92a3e6472d57c28b Simone Manganelli committed with Simone Manganelli May 9, 2009
Showing with 14 additions and 3 deletions.
  1. +14 −3 Plugin/Plugin.m
View
17 Plugin/Plugin.m
@@ -875,7 +875,7 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
CGContextRef context = [ [ NSGraphicsContext currentContext ] graphicsPort ];
- CGContextSetAlpha( context, pressed ? 0.40 : 0.25 );
+ CGContextSetAlpha( context, pressed ? 0.50 : 0.35 );
CGContextBeginTransparencyLayer( context, nil );
// Draw everything at full size, centered on the origin.
@@ -884,14 +884,25 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
NSRect borderRect = NSMakeRect( loc.x - kFrameXInset, loc.y - kFrameYInset, w, h );
NSBezierPath* fillPath = bezierPathWithRoundedRectCornerRadius( NSInsetRect( borderRect, -2, -2 ), 6 );
- [ [ NSColor colorWithCalibratedWhite: 1.0 alpha: 0.25 ] set ];
+ [ [ NSColor colorWithCalibratedWhite: 1.0 alpha: 0.45 ] set ];
[ fillPath fill ];
+ NSUInteger thickLineWidth = 5;
NSBezierPath* path = bezierPathWithRoundedRectCornerRadius( borderRect, 4 );
[ [ NSColor blackColor ] set ];
- [ path setLineWidth: 3 ];
+ [ path setLineWidth: thickLineWidth ];
[ path stroke ];
+ NSUInteger thinLineWidth = 2;
+ NSRect thinBorderRect = NSMakeRect( loc.x - kFrameXInset - thickLineWidth/4,
+ loc.y - kFrameYInset - thickLineWidth/4,
+ w + thickLineWidth/2,
+ h + thickLineWidth/2);
+ NSBezierPath* thinPath = bezierPathWithRoundedRectCornerRadius( thinBorderRect, 4 );
+ [ [ NSColor whiteColor ] set ];
+ [ thinPath setLineWidth: thinLineWidth ];
+ [ thinPath stroke ];
+
[ str drawAtPoint: loc withAttributes: attrs ];
// Now restore the graphics state:

0 comments on commit 760a889

Please sign in to comment.