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 55004998fff8cab168ef10f41037d458d50be60c..92894b81f4c497f14f4fe0aa9309e73d9f175fca 100644 |
| --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| @@ -184,7 +184,9 @@ class BackgroundColorHoverButton : public views::LabelButton { |
| BackgroundColorHoverButton(views::ButtonListener* listener, |
| const base::string16& text) |
| : views::LabelButton(listener, text) { |
| - SetImageLabelSpacing(views::kItemLabelSpacing); |
| + SetImageLabelSpacing(switches::IsMaterialDesignUserMenu() |
| + ? (kMaterialMenuEdgeMargin - 2) |
| + : views::kItemLabelSpacing); |
| const int button_margin = switches::IsMaterialDesignUserMenu() |
| ? kMaterialMenuEdgeMargin |
| : views::kButtonHEdgeMarginNew; |
| @@ -1713,6 +1715,7 @@ views::View* ProfileChooserView::CreateOptionsView(bool display_lock, |
| views::LabelButton* button = new BackgroundColorHoverButton( |
| this, profiles::GetProfileSwitcherTextForItem(item), |
| *image.ToImageSkia()); |
| + button->SetImageLabelSpacing(kMaterialMenuEdgeMargin); |
| open_other_profile_indexes_map_[button] = i; |
| layout->StartRow(1, 0); |
| @@ -1735,14 +1738,19 @@ views::View* ProfileChooserView::CreateOptionsView(bool display_lock, |
| } |
| } |
| - base::string16 text = browser_->profile()->IsGuestSession() ? |
| - l10n_util::GetStringUTF16(IDS_PROFILES_EXIT_GUEST) : |
| - l10n_util::GetStringUTF16(IDS_PROFILES_SWITCH_USERS_BUTTON); |
| - gfx::VectorIconId settings_icon = gfx::VectorIconId::ACCOUNT_BOX; |
| - if (!browser_->profile()->IsGuestSession() |
| - && switches::IsMaterialDesignUserMenu()) { |
| - text = l10n_util::GetStringUTF16(IDS_PROFILES_MANAGE_USERS_BUTTON); |
| - settings_icon = gfx::VectorIconId::SETTINGS; |
| + base::string16 text; |
| + gfx::VectorIconId settings_icon; |
| + if (switches::IsMaterialDesignUserMenu()) { |
| + text = browser_->profile()->IsGuestSession() ? |
|
sky
2016/07/19 17:57:53
nit: how about a variable around 1704ish for is_gu
|
| + l10n_util::GetStringUTF16(IDS_PROFILES_EXIT_GUEST) : |
| + l10n_util::GetStringUTF16(IDS_PROFILES_MANAGE_USERS_BUTTON); |
| + settings_icon = browser_->profile()->IsGuestSession() ? |
| + gfx::VectorIconId::CLOSE_ALL : gfx::VectorIconId::SETTINGS; |
| + } else { |
| + text = browser_->profile()->IsGuestSession() ? |
| + l10n_util::GetStringUTF16(IDS_PROFILES_EXIT_GUEST) : |
| + l10n_util::GetStringUTF16(IDS_PROFILES_SWITCH_USERS_BUTTON); |
| + settings_icon = gfx::VectorIconId::ACCOUNT_BOX; |
| } |
| users_button_ = new BackgroundColorHoverButton( |
| this, text, gfx::CreateVectorIcon(settings_icon, kIconSize, |