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

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

Issue 2345573003: Vectorize power icon in Ash system menu for MD (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | ash/resources/vector_icons/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74d94a0bbb012d3265409dfe676c001ce5ebb9f2..9fe00bdce68a78fb3daa82eaa4511b87c511dde1 100644
--- a/ash/common/system/date/date_default_view.cc
+++ b/ash/common/system/date/date_default_view.cc
@@ -90,10 +90,17 @@ DateDefaultView::DateDefaultView(LoginStatus login)
#if !defined(OS_WIN)
if (login != LoginStatus::LOCKED) {
- shutdown_button_ = new TrayPopupHeaderButton(
- this, IDR_AURA_UBER_TRAY_SHUTDOWN, IDR_AURA_UBER_TRAY_SHUTDOWN,
- IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER, IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER,
- IDS_ASH_STATUS_TRAY_SHUTDOWN);
+ if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
+ gfx::ImageSkia power_icon =
+ gfx::CreateVectorIcon(kSystemMenuPowerIcon, kMenuIconColor);
+ shutdown_button_ = new TrayPopupHeaderButton(
+ this, power_icon, IDS_ASH_STATUS_TRAY_SHUTDOWN);
+ } else {
+ shutdown_button_ = new TrayPopupHeaderButton(
+ this, IDR_AURA_UBER_TRAY_SHUTDOWN, IDR_AURA_UBER_TRAY_SHUTDOWN,
+ IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER, IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER,
+ IDS_ASH_STATUS_TRAY_SHUTDOWN);
+ }
shutdown_button_->SetTooltipText(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SHUTDOWN));
view->AddButton(shutdown_button_);
« no previous file with comments | « no previous file | ash/resources/vector_icons/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698