| Index: chrome/browser/cocoa/gradient_button_cell.mm
|
| diff --git a/chrome/browser/cocoa/gradient_button_cell.mm b/chrome/browser/cocoa/gradient_button_cell.mm
|
| index ac714749659c610279f12064e53b5b2fe018c6ad..15110e88584f5dbb84d8caeaa33c3f901204d6b8 100644
|
| --- a/chrome/browser/cocoa/gradient_button_cell.mm
|
| +++ b/chrome/browser/cocoa/gradient_button_cell.mm
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -14,8 +14,6 @@
|
|
|
| @interface GradientButtonCell (Private)
|
| - (void)sharedInit;
|
| -- (void)drawUnderlayImageWithFrame:(NSRect)cellFrame
|
| - inView:(NSView*)controlView;
|
|
|
| // Get drawing parameters for a given cell frame in a given view. The inner
|
| // frame is the one required by |-drawInteriorWithFrame:inView:|. The inner and
|
| @@ -122,16 +120,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4;
|
| shouldTheme_ = shouldTheme;
|
| }
|
|
|
| -- (NSImage*)underlayImage {
|
| - return underlayImage_;
|
| -}
|
| -
|
| -- (void)setUnderlayImage:(NSImage*)image {
|
| - underlayImage_.reset([image retain]);
|
| -
|
| - [[self controlView] setNeedsDisplay:YES];
|
| -}
|
| -
|
| - (NSBackgroundStyle)interiorBackgroundStyle {
|
| // Never lower the interior, since that just leads to a weird shadow which can
|
| // often interact badly with the theme.
|
| @@ -410,8 +398,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4;
|
| [shadow set];
|
| }
|
|
|
| - [self drawUnderlayImageWithFrame:cellFrame inView:controlView];
|
| -
|
| CGContextBeginTransparencyLayer(context, 0);
|
| NSRect imageRect = NSZeroRect;
|
| imageRect.size = [[self image] size];
|
| @@ -431,8 +417,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4;
|
| CGContextEndTransparencyLayer(context);
|
| [NSGraphicsContext restoreGraphicsState];
|
| } else {
|
| - [self drawUnderlayImageWithFrame:cellFrame inView:controlView];
|
| -
|
| // NSCell draws these uncentered for some reason, probably because of the
|
| // of control in the xib
|
| [super drawInteriorWithFrame:NSOffsetRect(cellFrame, 0, 1)
|
| @@ -440,19 +424,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4;
|
| }
|
| }
|
|
|
| -- (void)drawUnderlayImageWithFrame:(NSRect)cellFrame
|
| - inView:(NSView*)controlView {
|
| - if (underlayImage_) {
|
| - NSRect imageRect = NSZeroRect;
|
| - imageRect.size = [underlayImage_ size];
|
| - [underlayImage_ setFlipped:[controlView isFlipped]];
|
| - [underlayImage_ drawInRect:[self imageRectForBounds:cellFrame]
|
| - fromRect:imageRect
|
| - operation:NSCompositeSourceOver
|
| - fraction:[self isEnabled] ? 1.0 : 0.5];
|
| - }
|
| -}
|
| -
|
| - (NSBezierPath*)clipPathForFrame:(NSRect)cellFrame
|
| inView:(NSView*)controlView {
|
| NSBezierPath* boundingPath = nil;
|
|
|