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

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

Issue 900223004: [Mac, Win] The fast user switcher should use the small, non-high res default avatars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/profiles/profile_chooser_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
index b86fd5541f34527ef4bbcf38841f86eec36d2cdc..dc449c583134434bebc936b64e0bf8039a7812f8 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -1782,8 +1782,15 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
imageTitleSpacing:kImageTitleSpacing
backgroundColor:GetDialogBackgroundColor()]);
[profileButton setTitle:base::SysUTF16ToNSString(item.name)];
+
+ // Use the low-res, small default avatars in the fast user switcher, like
+ // we do in the menu bar.
+ gfx::Image itemIcon;
+ bool isRectangle;
+ AvatarMenu::GetImageForMenuButton(item.profile_path, &itemIcon, &isRectangle);
+
[profileButton setDefaultImage:CreateProfileImage(
- item.icon, kSmallImageSide).ToNSImage()];
+ itemIcon, kSmallImageSide).ToNSImage()];
[profileButton setImagePosition:NSImageLeft];
[profileButton setAlignment:NSLeftTextAlignment];
[profileButton setBordered:NO];

Powered by Google App Engine
This is Rietveld 408576698