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

Unified Diff: chrome/browser/ui/views/toolbar/app_menu_button.cc

Issue 1966643002: Integrate new MD update menu icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: This is here just to start getting real feedback. It is a very naive, raw integration. Created 4 years, 7 months 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 | « no previous file | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/app_menu_button.cc
diff --git a/chrome/browser/ui/views/toolbar/app_menu_button.cc b/chrome/browser/ui/views/toolbar/app_menu_button.cc
index ca12f2f1d1dd190b9bbe03d43558d92d344fc758..33e7a8fdef34a627863b13f7bdd310e953eed6b6 100644
--- a/chrome/browser/ui/views/toolbar/app_menu_button.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu_button.cc
@@ -134,6 +134,7 @@ void AppMenuButton::ScheduleAppMenuIconPaint() {
void AppMenuButton::UpdateIcon() {
DCHECK(ui::MaterialDesignController::IsModeMaterial());
+ gfx::VectorIconId icon_id = gfx::VectorIconId::BROWSER_TOOLS;
SkColor color = gfx::kPlaceholderColor;
switch (severity_) {
case AppMenuIconPainter::SEVERITY_NONE:
@@ -142,17 +143,19 @@ void AppMenuButton::UpdateIcon() {
break;
case AppMenuIconPainter::SEVERITY_LOW:
color = gfx::kGoogleGreen700;
+ icon_id = gfx::VectorIconId::UPDATE_MENU_SEVERITY_LOW;
break;
case AppMenuIconPainter::SEVERITY_MEDIUM:
color = gfx::kGoogleYellow700;
+ icon_id = gfx::VectorIconId::UPDATE_MENU_SEVERITY_MEDIUM;
break;
case AppMenuIconPainter::SEVERITY_HIGH:
color = gfx::kGoogleRed700;
+ icon_id = gfx::VectorIconId::UPDATE_MENU_SEVERITY_HIGH;
break;
}
kylix_rd 2016/05/10 14:20:10 TODO: Determine other state information to select
Evan Stade 2016/05/10 16:48:14 You're assuming the menu is changing color due to
kylix_rd 2016/05/10 17:49:01 The AppMenuBadgeController doesn't update the Badg
Evan Stade 2016/05/10 18:04:13 I suppose it must, or the logic of mapping state t
kylix_rd 2016/05/10 18:10:51 I've arrived at the same conclusion. A subsequent
Evan Stade 2016/05/10 18:48:39 no. First step would be to see if designers actual
kylix_rd 2016/05/10 19:17:02 Ah, so the question was more rhetorical and specul
- SetImage(views::Button::STATE_NORMAL,
- gfx::CreateVectorIcon(gfx::VectorIconId::BROWSER_TOOLS, color));
+ SetImage(views::Button::STATE_NORMAL, gfx::CreateVectorIcon(icon_id, color));
kylix_rd 2016/05/10 16:23:47 In seems that calling this gfx::CreateVectorIcon()
Evan Stade 2016/05/10 16:48:14 hardcode a value (16)
kylix_rd 2016/05/10 17:49:01 Done.
}
void AppMenuButton::SetTrailingMargin(int margin) {
« no previous file with comments | « no previous file | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698