Permalink
Browse files

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

  • Loading branch information...
1 parent ebe20e9 commit d870653633564040f41f093e7e208af4264ea71d Simone Manganelli committed with Simone Manganelli May 9, 2009
Showing with 14 additions and 3 deletions.
  1. +14 −3 Plugin/Plugin.m
View
@@ -891,7 +891,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.
@@ -900,14 +900,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 d870653

Please sign in to comment.