diff options
21 files changed, 50 insertions, 23 deletions
diff --git a/chrome/app/theme/profile_avatar_alien.png b/chrome/app/theme/profile_avatar_alien.png Binary files differindex 3802340..73f7c54 100644 --- a/chrome/app/theme/profile_avatar_alien.png +++ b/chrome/app/theme/profile_avatar_alien.png diff --git a/chrome/app/theme/profile_avatar_awesome.png b/chrome/app/theme/profile_avatar_awesome.png Binary files differindex ed92a6f..faab29fa 100644 --- a/chrome/app/theme/profile_avatar_awesome.png +++ b/chrome/app/theme/profile_avatar_awesome.png diff --git a/chrome/app/theme/profile_avatar_burger.png b/chrome/app/theme/profile_avatar_burger.png Binary files differindex 9357bed..71ef356 100644 --- a/chrome/app/theme/profile_avatar_burger.png +++ b/chrome/app/theme/profile_avatar_burger.png diff --git a/chrome/app/theme/profile_avatar_businessman.png b/chrome/app/theme/profile_avatar_businessman.png Binary files differindex 4653480..08cde48 100644 --- a/chrome/app/theme/profile_avatar_businessman.png +++ b/chrome/app/theme/profile_avatar_businessman.png diff --git a/chrome/app/theme/profile_avatar_cat.png b/chrome/app/theme/profile_avatar_cat.png Binary files differindex bdd487f..9b147f2 100644 --- a/chrome/app/theme/profile_avatar_cat.png +++ b/chrome/app/theme/profile_avatar_cat.png diff --git a/chrome/app/theme/profile_avatar_cupcake.png b/chrome/app/theme/profile_avatar_cupcake.png Binary files differindex 6f95f48..5cc3614 100644 --- a/chrome/app/theme/profile_avatar_cupcake.png +++ b/chrome/app/theme/profile_avatar_cupcake.png diff --git a/chrome/app/theme/profile_avatar_dog.png b/chrome/app/theme/profile_avatar_dog.png Binary files differindex 94957aa..f90a76a 100644 --- a/chrome/app/theme/profile_avatar_dog.png +++ b/chrome/app/theme/profile_avatar_dog.png diff --git a/chrome/app/theme/profile_avatar_flower.png b/chrome/app/theme/profile_avatar_flower.png Binary files differindex 9c738bc..4efa518 100644 --- a/chrome/app/theme/profile_avatar_flower.png +++ b/chrome/app/theme/profile_avatar_flower.png diff --git a/chrome/app/theme/profile_avatar_horse.png b/chrome/app/theme/profile_avatar_horse.png Binary files differindex 30dff2b..1ca0a4a 100644 --- a/chrome/app/theme/profile_avatar_horse.png +++ b/chrome/app/theme/profile_avatar_horse.png diff --git a/chrome/app/theme/profile_avatar_margarita.png b/chrome/app/theme/profile_avatar_margarita.png Binary files differindex b590d3e..7d5e5d5 100644 --- a/chrome/app/theme/profile_avatar_margarita.png +++ b/chrome/app/theme/profile_avatar_margarita.png diff --git a/chrome/app/theme/profile_avatar_ninja.png b/chrome/app/theme/profile_avatar_ninja.png Binary files differindex a4ba4b1..06abe09 100644 --- a/chrome/app/theme/profile_avatar_ninja.png +++ b/chrome/app/theme/profile_avatar_ninja.png diff --git a/chrome/app/theme/profile_avatar_note.png b/chrome/app/theme/profile_avatar_note.png Binary files differindex 955f270..3147a87 100644 --- a/chrome/app/theme/profile_avatar_note.png +++ b/chrome/app/theme/profile_avatar_note.png diff --git a/chrome/app/theme/profile_avatar_pizza.png b/chrome/app/theme/profile_avatar_pizza.png Binary files differindex 483bd4e..3e598908 100644 --- a/chrome/app/theme/profile_avatar_pizza.png +++ b/chrome/app/theme/profile_avatar_pizza.png diff --git a/chrome/app/theme/profile_avatar_secret_agent.png b/chrome/app/theme/profile_avatar_secret_agent.png Binary files differindex 876733a9..c544aac 100644 --- a/chrome/app/theme/profile_avatar_secret_agent.png +++ b/chrome/app/theme/profile_avatar_secret_agent.png diff --git a/chrome/app/theme/profile_avatar_soccer.png b/chrome/app/theme/profile_avatar_soccer.png Binary files differindex 49adc6d..d9aaf80 100644 --- a/chrome/app/theme/profile_avatar_soccer.png +++ b/chrome/app/theme/profile_avatar_soccer.png diff --git a/chrome/app/theme/profile_avatar_sun_cloud.png b/chrome/app/theme/profile_avatar_sun_cloud.png Binary files differindex d7fba85..68aef0a 100644 --- a/chrome/app/theme/profile_avatar_sun_cloud.png +++ b/chrome/app/theme/profile_avatar_sun_cloud.png diff --git a/chrome/app/theme/profile_avatar_superhero.png b/chrome/app/theme/profile_avatar_superhero.png Binary files differindex d95a13d..a8acb6c 100644 --- a/chrome/app/theme/profile_avatar_superhero.png +++ b/chrome/app/theme/profile_avatar_superhero.png diff --git a/chrome/app/theme/profile_avatar_volley_ball.png b/chrome/app/theme/profile_avatar_volley_ball.png Binary files differindex 93f7b20..d8c376f 100644 --- a/chrome/app/theme/profile_avatar_volley_ball.png +++ b/chrome/app/theme/profile_avatar_volley_ball.png diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd index 16276ef..0887162 100644 --- a/chrome/app/theme/theme_resources.grd +++ b/chrome/app/theme/theme_resources.grd @@ -206,27 +206,32 @@ <!-- NOTE: product_logo_*.* files beyond what's listed above are referenced by installer code; don't remove them unless you know what you're doing! --> - <include name="IDR_PROFILE_AVATAR_0" file="profile_avatar_generic_male.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_1" file="profile_avatar_generic_female.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_2" file="profile_avatar_secret_agent.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_3" file="profile_avatar_superhero.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_4" file="profile_avatar_volley_ball.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_5" file="profile_avatar_businessman.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_6" file="profile_avatar_ninja.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_7" file="profile_avatar_alien.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_8" file="profile_avatar_awesome.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_9" file="profile_avatar_flower.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_10" file="profile_avatar_pizza.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_11" file="profile_avatar_soccer.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_12" file="profile_avatar_burger.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_13" file="profile_avatar_cat.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_14" file="profile_avatar_cupcake.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_15" file="profile_avatar_dog.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_16" file="profile_avatar_horse.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_17" file="profile_avatar_margarita.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_18" file="profile_avatar_note.png" type="BINDATA" /> - <include name="IDR_PROFILE_AVATAR_19" file="profile_avatar_sun_cloud.png" type="BINDATA" /> - + <include name="IDR_PROFILE_AVATAR_0" file="profile_avatar_generic.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_1" file="profile_avatar_generic_aqua.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_2" file="profile_avatar_generic_blue.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_3" file="profile_avatar_generic_green.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_4" file="profile_avatar_generic_orange.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_5" file="profile_avatar_generic_purple.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_6" file="profile_avatar_generic_red.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_7" file="profile_avatar_generic_yellow.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_8" file="profile_avatar_secret_agent.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_9" file="profile_avatar_superhero.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_10" file="profile_avatar_volley_ball.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_11" file="profile_avatar_businessman.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_12" file="profile_avatar_ninja.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_13" file="profile_avatar_alien.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_14" file="profile_avatar_awesome.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_15" file="profile_avatar_flower.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_16" file="profile_avatar_pizza.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_17" file="profile_avatar_soccer.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_18" file="profile_avatar_burger.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_19" file="profile_avatar_cat.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_20" file="profile_avatar_cupcake.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_21" file="profile_avatar_dog.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_22" file="profile_avatar_horse.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_23" file="profile_avatar_margarita.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_24" file="profile_avatar_note.png" type="BINDATA" /> + <include name="IDR_PROFILE_AVATAR_25" file="profile_avatar_sun_cloud.png" type="BINDATA" /> <include name="IDR_RESTORE_BUTTON_MASK" file="restore_button_mask.png" type="BINDATA" /> <include name="IDR_SAD_TAB" file="sadtab.png" type="BINDATA" /> <include name="IDR_SAFEBROWSING_WARNING" file="safebrowsing_warning.png" type="BINDATA" /> diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc index 32bf6d5..d50e24e 100644 --- a/chrome/browser/profiles/profile_info_cache.cc +++ b/chrome/browser/profiles/profile_info_cache.cc @@ -49,10 +49,28 @@ const int kDefaultAvatarIconResources[] = { IDR_PROFILE_AVATAR_17, IDR_PROFILE_AVATAR_18, IDR_PROFILE_AVATAR_19, + IDR_PROFILE_AVATAR_20, + IDR_PROFILE_AVATAR_21, + IDR_PROFILE_AVATAR_22, + IDR_PROFILE_AVATAR_23, + IDR_PROFILE_AVATAR_24, + IDR_PROFILE_AVATAR_25, }; const size_t kDefaultAvatarIconsCount = arraysize(kDefaultAvatarIconResources); +// Returns true if the resource ID belongs to a generic avatar icon. +bool IsAvatarIconGeneric(int icon_id) { + return icon_id == IDR_PROFILE_AVATAR_0 || + icon_id == IDR_PROFILE_AVATAR_1 || + icon_id == IDR_PROFILE_AVATAR_2 || + icon_id == IDR_PROFILE_AVATAR_3 || + icon_id == IDR_PROFILE_AVATAR_4 || + icon_id == IDR_PROFILE_AVATAR_5 || + icon_id == IDR_PROFILE_AVATAR_6 || + icon_id == IDR_PROFILE_AVATAR_7; +} + } // namespace ProfileInfoCache::ProfileInfoCache(PrefService* prefs, @@ -195,6 +213,10 @@ int ProfileInfoCache::ChooseAvatarIconIndexForNewProfile() { ++icon_index) { size_t rand_icon_index = (icon_index + rand_start_index) % GetDefaultAvatarIconCount(); + if (IsAvatarIconGeneric(GetDefaultAvatarIconResourceIDAtIndex( + rand_icon_index))) + continue; + bool icon_found = false; for (size_t i = 0; i < GetNumberOfProfiles(); ++i) { if (GetAvatarIconIndexOfProfileAtIndex(i) == rand_icon_index) { diff --git a/chrome/browser/ui/views/avatar_menu.cc b/chrome/browser/ui/views/avatar_menu.cc index 346f521..8fdcb24 100644 --- a/chrome/browser/ui/views/avatar_menu.cc +++ b/chrome/browser/ui/views/avatar_menu.cc @@ -28,8 +28,8 @@ namespace { -const int kCellWidth = 32; -const int kCellHeight = 32; +const int kCellWidth = 38; +const int kCellHeight = 31; const int kCellPaddingX = 5; const int kCellPaddingY = 5; const int kGridMaxCol = 3; |