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

Side by Side Diff: ash/common/system/chromeos/tray_caps_lock.cc

Issue 2252823002: Updates to Ash material design icons used for TrayImageItem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/chromeos/tray_caps_lock.h" 5 #include "ash/common/system/chromeos/tray_caps_lock.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/tray/actionable_view.h" 8 #include "ash/common/system/tray/actionable_view.h"
9 #include "ash/common/system/tray/fixed_sized_image_view.h" 9 #include "ash/common/system/tray/fixed_sized_image_view.h"
10 #include "ash/common/system/tray/system_tray_delegate.h" 10 #include "ash/common/system/tray/system_tray_delegate.h"
(...skipping 30 matching lines...) Expand all
41 public: 41 public:
42 CapsLockDefaultView() 42 CapsLockDefaultView()
43 : text_label_(new views::Label), shortcut_label_(new views::Label) { 43 : text_label_(new views::Label), shortcut_label_(new views::Label) {
44 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 44 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
45 kTrayPopupPaddingHorizontal, 0, 45 kTrayPopupPaddingHorizontal, 0,
46 kTrayPopupPaddingBetweenItems)); 46 kTrayPopupPaddingBetweenItems));
47 47
48 FixedSizedImageView* image = 48 FixedSizedImageView* image =
49 new FixedSizedImageView(0, GetTrayConstant(TRAY_POPUP_ITEM_HEIGHT)); 49 new FixedSizedImageView(0, GetTrayConstant(TRAY_POPUP_ITEM_HEIGHT));
50 if (MaterialDesignController::UseMaterialDesignSystemIcons()) { 50 if (MaterialDesignController::UseMaterialDesignSystemIcons()) {
51 image->SetImage(CreateVectorIcon(gfx::VectorIconId::SYSTEM_MENU_CAPS_LOCK, 51 image->SetImage(gfx::CreateVectorIcon(
52 kMenuIconSize, kMenuIconColor)); 52 gfx::VectorIconId::SYSTEM_MENU_CAPS_LOCK, kMenuIconColor));
53 } else { 53 } else {
54 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 54 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
55 image->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_CAPS_LOCK_DARK) 55 image->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_CAPS_LOCK_DARK)
56 .ToImageSkia()); 56 .ToImageSkia());
57 } 57 }
58 AddChildView(image); 58 AddChildView(image);
59 59
60 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 60 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
61 AddChildView(text_label_); 61 AddChildView(text_label_);
62 62
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 void TrayCapsLock::DestroyDefaultView() { 223 void TrayCapsLock::DestroyDefaultView() {
224 default_ = NULL; 224 default_ = NULL;
225 } 225 }
226 226
227 void TrayCapsLock::DestroyDetailedView() { 227 void TrayCapsLock::DestroyDetailedView() {
228 detailed_ = NULL; 228 detailed_ = NULL;
229 } 229 }
230 230
231 } // namespace ash 231 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/tray/default_system_tray_delegate.cc » ('j') | ash/common/system/tray/system_tray_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698