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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm

Issue 2200303004: [Mac][Material Design] Adjust bookmark spacing and folder menu drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests, changes for icon-only items. Created 4 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
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm
index f402857a3150840a7cd0c5c6fd09f3394c05d04d..4f4905735b3b3c9525c4bd0ef5ba130740777a21 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm
@@ -59,6 +59,7 @@ BookmarkButton* gDraggedButton = nil; // Weak
@synthesize delegate = delegate_;
@synthesize acceptsTrackIn = acceptsTrackIn_;
+@synthesize backgroundColor = backgroundColor_;
- (id)initWithFrame:(NSRect)frameRect {
// BookmarkButton's ViewID may be changed to VIEW_ID_OTHER_BOOKMARKS in
@@ -81,6 +82,8 @@ BookmarkButton* gDraggedButton = nil; // Weak
[area_ release];
}
+ [backgroundColor_ release];
+
[super dealloc];
}
@@ -424,7 +427,12 @@ BookmarkButton* gDraggedButton = nil; // Weak
- (void)drawRect:(NSRect)rect {
NSView* bookmarkBarToolbarView = [[self superview] superview];
- [self cr_drawUsingAncestor:bookmarkBarToolbarView inRect:(NSRect)rect];
+ if (backgroundColor_) {
+ [backgroundColor_ set];
+ NSRectFill(rect);
+ } else {
+ [self cr_drawUsingAncestor:bookmarkBarToolbarView inRect:(NSRect)rect];
+ }
[super drawRect:rect];
}
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_button.h ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698