diff options
Diffstat (limited to 'chrome/browser/ui/cocoa/hover_close_button.mm')
-rw-r--r-- | chrome/browser/ui/cocoa/hover_close_button.mm | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/chrome/browser/ui/cocoa/hover_close_button.mm b/chrome/browser/ui/cocoa/hover_close_button.mm index fbcb2ec..c2fed30 100644 --- a/chrome/browser/ui/cocoa/hover_close_button.mm +++ b/chrome/browser/ui/cocoa/hover_close_button.mm @@ -93,6 +93,14 @@ NSString* const kFadeOutValueKeyPath = @"fadeOutValue"; switch(self.hoverState) { case kHoverStateMouseOver: + [image drawInRect:destRect + fromRect:imageRect + operation:NSCompositeSourceOver + fraction:1.0 + respectFlipped:YES + hints:nil]; + break; + case kHoverStateMouseDown: [image drawInRect:destRect fromRect:imageRect @@ -129,17 +137,6 @@ NSString* const kFadeOutValueKeyPath = @"fadeOutValue"; } } -- (NSRect)focusRingMaskBounds { - // This override won't be needed once we link with 10.8+ SDK. - return [self bounds]; -} - -- (void)drawFocusRingMask { - // Match the hover image's shape. - NSRect circleRect = NSInsetRect([self bounds], 2, 2); - [[NSBezierPath bezierPathWithOvalInRect:circleRect] fill]; -} - - (void)setFadeOutValue:(CGFloat)value { [self setNeedsDisplay]; } |