Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: chrome/browser/ui/cocoa/hover_close_button.mm

Issue 1310183005: Mac: Fix missing focus rings on toolbar, profile, and tab buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: Fix extension buttons Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/gradient_button_cell.mm ('k') | chrome/browser/ui/cocoa/image_button_cell.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/hover_close_button.mm
diff --git a/chrome/browser/ui/cocoa/hover_close_button.mm b/chrome/browser/ui/cocoa/hover_close_button.mm
index cd767a84bde7759d0f37140e049e426a3c996668..be82dc52a8a71f22519de5974abb0d40df08b6f1 100644
--- a/chrome/browser/ui/cocoa/hover_close_button.mm
+++ b/chrome/browser/ui/cocoa/hover_close_button.mm
@@ -96,14 +96,6 @@ 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
@@ -140,6 +132,12 @@ NSString* const kFadeOutValueKeyPath = @"fadeOutValue";
}
}
+- (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];
}
« no previous file with comments | « chrome/browser/ui/cocoa/gradient_button_cell.mm ('k') | chrome/browser/ui/cocoa/image_button_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698