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

Unified Diff: chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm

Issue 1870333002: [Mac][Material Design] Change toolbar buttons to 24x24 from 28x28. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix conditional. Created 4 years, 8 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 | « no previous file | chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm
index e0726749932e1ff59d7655f05cf9be3780182e1e..c698ace149a5a36505ec972e71551a510117c869 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm
@@ -17,8 +17,8 @@
namespace {
-// The bounds of toolbar buttons in Material Design.
-const NSRect kMDButtonBounds = NSMakeRect(0, 0, 28, 28);
+// Toolbar buttons are 24x24 in Material Design.
+const NSRect kMDButtonBounds = NSMakeRect(0, 0, 24, 24);
// The size of a toolbar button icon in Material Design. A toolbar button image
// consists of a border and background, with a centered icon.
@@ -79,9 +79,10 @@ const NSSize kMDButtonIconSize = NSMakeSize(16, 16);
+ (void)drawImage:(ToolbarButtonImageRep*)imageRep {
// Create the path used for the background fill.
- NSRect destRect = NSInsetRect(kMDButtonBounds, 2, 2);
NSBezierPath* roundedRectPath =
- [NSBezierPath bezierPathWithRoundedRect:destRect xRadius:2 yRadius:2];
+ [NSBezierPath bezierPathWithRoundedRect:kMDButtonBounds
+ xRadius:2
+ yRadius:2];
// Determine the fill color.
NSColor* fillColor = nil;
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698