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

Side by Side Diff: ui/views/controls/menu/menu_image_util.cc

Issue 2653223005: Move views vector icons from source_set to part of views target. (Closed)
Patch Set: rebase Created 3 years, 11 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
« no previous file with comments | « ui/views/controls/button/radio_button.cc ('k') | ui/views/resources/vector_icons/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/controls/menu/menu_image_util.h" 5 #include "ui/views/controls/menu/menu_image_util.h"
6 6
7 #include "ui/base/material_design/material_design_controller.h" 7 #include "ui/base/material_design/material_design_controller.h"
8 #include "ui/gfx/color_palette.h" 8 #include "ui/gfx/color_palette.h"
9 #include "ui/gfx/paint_vector_icon.h" 9 #include "ui/gfx/paint_vector_icon.h"
10 #include "ui/gfx/vector_icon_types.h" 10 #include "ui/gfx/vector_icon_types.h"
11 #include "ui/views/resources/vector_icons/vector_icons.h" 11 #include "ui/views/vector_icons.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 gfx::ImageSkia GetMenuCheckImage(SkColor icon_color) { 15 gfx::ImageSkia GetMenuCheckImage(SkColor icon_color) {
16 return gfx::CreateVectorIcon(kMenuCheckIcon, icon_color); 16 return gfx::CreateVectorIcon(kMenuCheckIcon, icon_color);
17 } 17 }
18 18
19 gfx::ImageSkia GetRadioButtonImage(bool toggled, 19 gfx::ImageSkia GetRadioButtonImage(bool toggled,
20 bool hovered, 20 bool hovered,
21 SkColor default_icon_color) { 21 SkColor default_icon_color) {
22 const gfx::VectorIcon& icon = 22 const gfx::VectorIcon& icon =
23 toggled ? kMenuRadioSelectedIcon : kMenuRadioEmptyIcon; 23 toggled ? kMenuRadioSelectedIcon : kMenuRadioEmptyIcon;
24 SkColor color = 24 SkColor color =
25 toggled && !hovered ? gfx::kGoogleBlue500 : default_icon_color; 25 toggled && !hovered ? gfx::kGoogleBlue500 : default_icon_color;
26 return gfx::CreateVectorIcon(icon, kMenuCheckSize, color); 26 return gfx::CreateVectorIcon(icon, kMenuCheckSize, color);
27 } 27 }
28 28
29 gfx::ImageSkia GetSubmenuArrowImage(SkColor icon_color) { 29 gfx::ImageSkia GetSubmenuArrowImage(SkColor icon_color) {
30 return gfx::CreateVectorIcon(kSubmenuArrowIcon, icon_color); 30 return gfx::CreateVectorIcon(kSubmenuArrowIcon, icon_color);
31 } 31 }
32 32
33 } // namespace views 33 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/radio_button.cc ('k') | ui/views/resources/vector_icons/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698