Skip to content

Commit

Permalink
Increase alpha values so that you can actually see the buttons on hul…
Browse files Browse the repository at this point in the history
…u.com.

Signed-off-by: Jonathan 'Wolf' Rentzsch <[email protected]>
  • Loading branch information
lapcat authored and rentzsch committed Apr 4, 2009
1 parent 1fce5ad commit b19cf32
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 @@ -522,7 +522,7 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed

CGContextRef context = [ [ NSGraphicsContext currentContext ] graphicsPort ];

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

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

NSBezierPath* path = bezierPathWithRoundedRectCornerRadius( borderRect, 4 );
Expand All @@ -550,7 +550,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.0];
NSColor *endingColor = [NSColor colorWithDeviceWhite:1.0 alpha:0.20];
NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:startingColor endingColor:endingColor];

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

NSColor *startingColor = [NSColor colorWithDeviceWhite:1.0 alpha:0.15];
NSColor *endingColor = [NSColor colorWithDeviceWhite:0.0 alpha:0.15];
NSColor *startingColor = [NSColor colorWithDeviceWhite:1.0 alpha:0.35];
NSColor *endingColor = [NSColor colorWithDeviceWhite:0.0 alpha:0.35];
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 b19cf32

Please sign in to comment.