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

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

Issue 8511064: GAIA Profile info prototype (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 9 years, 1 month 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 | « chrome/browser/sync/signin_manager.cc ('k') | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/avatar_menu_bubble_view.cc
diff --git a/chrome/browser/ui/views/avatar_menu_bubble_view.cc b/chrome/browser/ui/views/avatar_menu_bubble_view.cc
index 9a28116eb2a78de24c8f288eaa186a4b03c6f1f3..e0d21efb7e15411696213857efe62107b78b08d4 100644
--- a/chrome/browser/ui/views/avatar_menu_bubble_view.cc
+++ b/chrome/browser/ui/views/avatar_menu_bubble_view.cc
@@ -310,8 +310,13 @@ SkBitmap ProfileItemView::GetBadgedIcon(const SkBitmap& icon) {
int height = icon_rect.height() + badge.height() * kBadgeOverlapRatioY;
gfx::CanvasSkia canvas(width, height, false);
- canvas.DrawBitmapInt(icon, 0, 0, icon.width(), icon.height(), 0, 0,
- icon_rect.width(), icon_rect.height(), true);
+ if (icon.width() == icon_rect.width() &&
+ icon.height() == icon_rect.height()) {
+ canvas.DrawBitmapInt(icon, 1, 1);
+ } else {
+ canvas.DrawBitmapInt(icon, 0, 0, icon.width(), icon.height(), 0, 0,
+ icon_rect.width(), icon_rect.height(), true);
+ }
canvas.DrawBitmapInt(badge, width - badge.width(), height - badge.height());
return canvas.ExtractBitmap();
}
« no previous file with comments | « chrome/browser/sync/signin_manager.cc ('k') | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698