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

Unified Diff: chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm

Issue 2268393002: [Mac][MD User Menu] Adjusted the vertical position of icon in avatar button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extra { 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
index 409f9ab5532b0709b3bbfc41a2af33d358129b11..83046d2e9e0049d34d76e86020e3dd171edc4125 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
@@ -97,10 +97,10 @@ NSImage* GetImageFromResourceID(int resourceId) {
- (void)drawImage:(NSImage*)image
withFrame:(NSRect)frame
inView:(NSView*)controlView {
- // The image used in the generic button case needs to be shifted down
- // slightly to be centered correctly.
+ // The image used in the generic button case as well as the material-designed
+ // error icon both need to be shifted down slightly to be centered correctly.
// TODO(noms): When the assets are fixed, remove this latter offset.
- if (!hasError_)
+ if (!hasError_ || switches::IsMaterialDesignUserMenu())
frame = NSOffsetRect(frame, 0, 1);
[super drawImage:image withFrame:frame inView:controlView];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698