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

Unified Diff: chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc

Issue 257843004: Add in resize logic for the non-badged icons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc
diff --git a/chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc b/chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc
index aa3b695147aa85ca215b3e0b86f10069d11cea3d..710e5e08ba1c6836caf59d4b96f5822a22021152 100644
--- a/chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc
+++ b/chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc
@@ -259,7 +259,9 @@ ProfileItemView::ProfileItemView(const AvatarMenu::Item& item,
set_notify_enter_exit_on_child(true);
image_view_ = new ProfileImageView();
- gfx::ImageSkia profile_icon = *item_.icon.ToImageSkia();
+ // GetSizedAvatarIcon will resize the icon in case it's too large.
+ const gfx::ImageSkia profile_icon = *profiles::GetSizedAvatarIcon(item_.icon,
+ false, profiles::kAvatarIconWidth, kItemHeight).ToImageSkia();
if (item_.active || item_.signin_required)
image_view_->SetImage(GetBadgedIcon(profile_icon));
else
« 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