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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm

Issue 1327203003: Mac: Fix missing focus rings on toolbar, profile, and tab buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2490
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h"
6 6
7 @implementation ToolbarButton 7 @implementation ToolbarButton
8 8
9 @synthesize handleMiddleClick = handleMiddleClick_; 9 @synthesize handleMiddleClick = handleMiddleClick_;
10 10
(...skipping 30 matching lines...) Expand all
41 if (isInside) 41 if (isInside)
42 [self sendAction:[self action] to:[self target]]; 42 [self sendAction:[self action] to:[self target]];
43 } 43 }
44 44
45 - (BOOL)shouldHandleEvent:(NSEvent*)theEvent { 45 - (BOOL)shouldHandleEvent:(NSEvent*)theEvent {
46 // |buttonNumber| is the mouse button whose action triggered theEvent. 46 // |buttonNumber| is the mouse button whose action triggered theEvent.
47 // 2 corresponds to the middle mouse button. 47 // 2 corresponds to the middle mouse button.
48 return handleMiddleClick_ && [theEvent buttonNumber] == 2; 48 return handleMiddleClick_ && [theEvent buttonNumber] == 2;
49 } 49 }
50 50
51 - (void)drawFocusRingMask {
52 // Match the hover image's bezel.
53 [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect([self bounds], 2, 2)
54 xRadius:2
55 yRadius:2] fill];
56 }
57
51 @end 58 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698