Commit b877548e authored by janeliulwq's avatar janeliulwq Committed by Commit bot

Changed two icons for desktop user menu on Linux/Windows:

1. Changed the icon for the "Manage people" button;
2. Changed the icon for sync error on the titlebar.

See design doc here: https://docs.google.com/document/d/17yHrKd_EU6WoIAgljnZmNCSJLRlbM3O2Pxr7aPEnqik/edit?ts=57445a70#heading=h.6xesoh23gozz

This CL is dependent on https://codereview.chromium.org/2028473002/

BUG=615893

Review-Url: https://codereview.chromium.org/2019053002
Cr-Commit-Position: refs/heads/master@{#398141}
parent 471891bc
......@@ -14,6 +14,7 @@
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/ui/views/profiles/avatar_button_delegate.h"
#include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
......@@ -213,9 +214,15 @@ void NewAvatarButton::Update() {
if (use_generic_button) {
SetImage(views::Button::STATE_NORMAL, generic_avatar_);
} else if (has_auth_error_) {
SetImage(views::Button::STATE_NORMAL,
gfx::CreateVectorIcon(gfx::VectorIconId::WARNING, 13,
gfx::kGoogleYellow700));
if (switches::IsMaterialDesignUserMenu()) {
SetImage(views::Button::STATE_NORMAL,
gfx::CreateVectorIcon(gfx::VectorIconId::SYNC_PROBLEM, 13,
gfx::kGoogleRed700));
} else {
SetImage(views::Button::STATE_NORMAL,
gfx::CreateVectorIcon(gfx::VectorIconId::WARNING, 13,
gfx::kGoogleYellow700));
}
} else {
SetImage(views::Button::STATE_NORMAL, gfx::ImageSkia());
}
......
......@@ -1498,9 +1498,13 @@ views::View* ProfileChooserView::CreateOptionsView(bool display_lock) {
l10n_util::GetStringUTF16(IDS_PROFILES_EXIT_GUEST) :
l10n_util::GetStringUTF16(IDS_PROFILES_MANAGE_USERS_BUTTON);
const int kIconSize = 16;
gfx::VectorIconId settings_icon = switches::IsMaterialDesignUserMenu() ?
gfx::VectorIconId::SETTINGS : gfx::VectorIconId::ACCOUNT_BOX;
users_button_ = new BackgroundColorHoverButton(
this, text, gfx::CreateVectorIcon(gfx::VectorIconId::ACCOUNT_BOX,
kIconSize, gfx::kChromeIconGrey));
this, text, gfx::CreateVectorIcon(settings_icon, kIconSize,
gfx::kChromeIconGrey));
layout->StartRow(1, 0);
layout->AddView(users_button_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment