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

Unified Diff: ash/common/system/date/date_default_view.cc

Issue 2327943002: Vectorize help icon in Ash system menu for MD (Closed)
Patch Set: Rebased Created 4 years, 3 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
Index: ash/common/system/date/date_default_view.cc
diff --git a/ash/common/system/date/date_default_view.cc b/ash/common/system/date/date_default_view.cc
index 35eddfb5a4b05410e64cb15f54942899e8e97a03..74d94a0bbb012d3265409dfe676c001ce5ebb9f2 100644
--- a/ash/common/system/date/date_default_view.cc
+++ b/ash/common/system/date/date_default_view.cc
@@ -4,6 +4,7 @@
#include "ash/common/system/date/date_default_view.h"
+#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/metrics/user_metrics_action.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/system/date/date_view.h"
@@ -12,10 +13,12 @@
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_popup_header_button.h"
#include "ash/common/wm_shell.h"
+#include "ash/resources/vector_icons/vector_icons.h"
#include "base/i18n/rtl.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/layout/fill_layout.h"
@@ -63,10 +66,17 @@ DateDefaultView::DateDefaultView(LoginStatus login)
date_view_->SetAction(TrayDate::SHOW_DATE_SETTINGS);
- help_button_ = new TrayPopupHeaderButton(
- this, IDR_AURA_UBER_TRAY_HELP, IDR_AURA_UBER_TRAY_HELP,
- IDR_AURA_UBER_TRAY_HELP_HOVER, IDR_AURA_UBER_TRAY_HELP_HOVER,
- IDS_ASH_STATUS_TRAY_HELP);
+ if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
+ gfx::ImageSkia help_icon =
+ gfx::CreateVectorIcon(kSystemMenuHelpIcon, kMenuIconColor);
+ help_button_ =
+ new TrayPopupHeaderButton(this, help_icon, IDS_ASH_STATUS_TRAY_HELP);
+ } else {
+ help_button_ = new TrayPopupHeaderButton(
+ this, IDR_AURA_UBER_TRAY_HELP, IDR_AURA_UBER_TRAY_HELP,
+ IDR_AURA_UBER_TRAY_HELP_HOVER, IDR_AURA_UBER_TRAY_HELP_HOVER,
+ IDS_ASH_STATUS_TRAY_HELP);
+ }
if (base::i18n::IsRTL() &&
base::i18n::GetConfiguredLocale() == kHebrewLocale) {
// The asset for the help button is a question mark '?'. Normally this asset

Powered by Google App Engine
This is Rietveld 408576698