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

Unified Diff: ash/system/web_notification/web_notification_tray.cc

Issue 2051663005: Vectorize the remaining material design shelf icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit addressed Created 4 years, 6 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 | « ash/system/overview/overview_button_tray.cc ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/web_notification_tray.cc
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc
index afdb9df6ab1a611d2337b1b188d34cc973b282e7..a61be1105352d9f7d7c06b82edeb857909d7802e 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -5,6 +5,8 @@
#include "ash/system/web_notification/web_notification_tray.h"
#include "ash/ash_switches.h"
+#include "ash/common/material_design/material_design_controller.h"
+#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm_lookup.h"
@@ -123,9 +125,17 @@ class WebNotificationButton : public views::CustomButton {
unread_count_(0) {
SetLayoutManager(new views::FillLayout);
- no_unread_icon_.SetImage(gfx::CreateVectorIcon(
- gfx::VectorIconId::NOTIFICATIONS, kNoUnreadIconSize,
- kWebNotificationColorNoUnread));
+ gfx::ImageSkia image;
+ if (MaterialDesignController::IsShelfMaterial()) {
+ image = CreateVectorIcon(gfx::VectorIconId::SHELF_NOTIFICATIONS,
+ kShelfIconColor);
+ } else {
+ image =
+ CreateVectorIcon(gfx::VectorIconId::NOTIFICATIONS, kNoUnreadIconSize,
+ kWebNotificationColorNoUnread);
+ }
+
+ no_unread_icon_.SetImage(image);
no_unread_icon_.set_owned_by_client();
unread_label_.set_owned_by_client();
« no previous file with comments | « ash/system/overview/overview_button_tray.cc ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698