Skip to content

Commit

Permalink
Revert "Increase alpha values so that you can actually see the button…
Browse files Browse the repository at this point in the history
…s on hulu.com."

This reverts commit b19cf32.
  • Loading branch information
rentzsch committed Apr 9, 2009
1 parent 7c05e66 commit ea1a326
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Plugin/Plugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed

CGContextRef context = [ [ NSGraphicsContext currentContext ] graphicsPort ];

CGContextSetAlpha( context, pressed ? 0.60 : 0.45 );
CGContextSetAlpha( context, pressed ? 0.40 : 0.25 );
CGContextBeginTransparencyLayer( context, nil );

// Draw everything at full size, centered on the origin.
Expand All @@ -541,7 +541,7 @@ - (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.45 ] set ];
[ [ NSColor colorWithCalibratedWhite: 1.0 alpha: 0.25 ] set ];
[ fillPath fill ];

NSBezierPath* path = bezierPathWithRoundedRectCornerRadius( borderRect, 4 );
Expand All @@ -560,7 +560,7 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
NSImage *gearImage = [NSImage imageNamed:@"NSActionTemplate"];

NSColor *startingColor = [NSColor colorWithDeviceWhite:1.0 alpha:1.0];
NSColor *endingColor = [NSColor colorWithDeviceWhite:1.0 alpha:0.20];
NSColor *endingColor = [NSColor colorWithDeviceWhite:1.0 alpha:0.0];
NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:startingColor endingColor:endingColor];

NSPoint gearImageCenter = NSMakePoint(0 - viewWidth/2 + margin + gearImage.size.height/2,
Expand Down Expand Up @@ -597,8 +597,8 @@ - (void) _drawBackground
NSRect fillRect = NSInsetRect(selfBounds, 1.0, 1.0);
NSRect strokeRect = selfBounds;

NSColor *startingColor = [NSColor colorWithDeviceWhite:1.0 alpha:0.35];
NSColor *endingColor = [NSColor colorWithDeviceWhite:0.0 alpha:0.35];
NSColor *startingColor = [NSColor colorWithDeviceWhite:1.0 alpha:0.15];
NSColor *endingColor = [NSColor colorWithDeviceWhite:0.0 alpha:0.15];
NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:startingColor endingColor:endingColor];

// When the mouse is up or outside the view, we want a convex look, so we draw the gradient downward (90+180=270 degrees).
Expand Down

0 comments on commit ea1a326

Please sign in to comment.