Chromium Code Reviews| Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| index 13b7e8b93e6aa43c58b7272f070e4863897edd0b..c29c1bc1ded7ad7d30dc345eaf074fb0b2a81a47 100644 |
| --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| @@ -1264,14 +1264,15 @@ void ProfileChooserView::CreateAccountButton(views::GridLayout* layout, |
| rb->GetImageNamed(IDR_CLOSE_1).ToImageSkia(); |
| const int kDeleteButtonWidth = delete_default_image->width(); |
| const gfx::ImageSkia* warning_default_image = reauth_required ? |
| - rb->GetImageNamed(IDR_WARNING).ToImageSkia() : NULL; |
| + rb->GetImageNamed(IDR_ICON_PROFILES_ACCOUNT_AUTH_ERROR).ToImageSkia() : |
|
msw
2014/05/30 18:24:13
nit: Are you doing this to have consistent iconogr
noms (inactive)
2014/06/09 20:34:19
I haven't added a before screenshot, but I've upda
|
| + NULL; |
| const int kWarningButtonWidth = reauth_required ? |
| warning_default_image->width() + views::kRelatedButtonHSpacing : 0; |
| int available_width = width - |
| kDeleteButtonWidth - kWarningButtonWidth - views::kButtonHEdgeMarginNew; |
| views::LabelButton* email_button = new BackgroundColorHoverButton( |
| - NULL, |
| + reauth_required ? this : NULL, |
| gfx::ElideEmail(base::UTF8ToUTF16(account), |
| rb->GetFontList(ui::ResourceBundle::BaseFont), |
| available_width), |
| @@ -1302,16 +1303,12 @@ void ProfileChooserView::CreateAccountButton(views::GridLayout* layout, |
| // Warning button. |
| if (reauth_required) { |
| - views::ImageButton* reauth_button = new views::ImageButton(this); |
| - reauth_button->SetImageAlignment(views::ImageButton::ALIGN_LEFT, |
| - views::ImageButton::ALIGN_MIDDLE); |
| - reauth_button->SetImage(views::ImageButton::STATE_NORMAL, |
| - warning_default_image); |
| - reauth_button->SetBounds( |
| + views::ImageView* reauth_icon = new views::ImageView(); |
|
msw
2014/05/30 18:24:13
So you're changing the email_button to handle clic
noms (inactive)
2014/06/09 20:34:19
Added, but the tl; dr was : the change was done as
|
| + reauth_icon->SetImage(warning_default_image); |
| + reauth_icon->SetBounds( |
| available_width, 0, kWarningButtonWidth, kButtonHeight); |
| - |
| - email_button->AddChildView(reauth_button); |
| - reauth_account_button_map_[reauth_button] = account; |
| + email_button->AddChildView(reauth_icon); |
| + reauth_account_button_map_[email_button] = account; |
| } |
| } |