OLD | NEW |
---|---|
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 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_IMAGE_UTIL_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_IMAGE_UTIL_H_ |
6 #define UI_VIEWS_CONTROLS_MENU_MENU_IMAGE_UTIL_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_IMAGE_UTIL_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
9 #include "ui/gfx/image/image_skia.h" | 9 #include "ui/gfx/image/image_skia.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 | 12 |
13 // The width/height of the check and submenu arrows. | 13 // The width/height of the check and submenu arrows. |
14 const int kMenuCheckSize = 16; | 14 const int kMenuCheckSize = 16; |
15 const int kSubmenuArrowSize = 8; | 15 const int kSubmenuArrowSize = 8; |
16 | 16 |
17 // Returns the Menu Check box image (always checked). | 17 // Returns the Menu Check box image (always checked). |
18 gfx::ImageSkia GetMenuCheckImage(SkColor icon_color); | 18 gfx::ImageSkia GetMenuCheckImage(SkColor icon_color); |
19 | 19 |
20 // Return the RadioButton image for given state. | 20 // Return the RadioButton image for given state. |toggled| is true when |
21 // It returns the "selected" image when |selected| is | 21 // the radio option is active, |hovered| describes the menu higlight/selection |
sadrul
2016/01/26 21:59:30
"the radio option is active" would 'selected' be b
Evan Stade
2016/01/26 22:31:53
I avoided the word selection because it's ambiguou
| |
22 // true, or the "unselected" image if false. | 22 // state, and |default_icon_color| is the base color that should be used for |
23 gfx::ImageSkia GetRadioButtonImage(bool selected); | 23 // the icon (which may be ignored based on the other two flags). |
24 gfx::ImageSkia GetRadioButtonImage(bool toggled, | |
25 bool hovered, | |
26 SkColor default_icon_color); | |
24 | 27 |
25 // Returns the image for submenu arrow for current RTL setting. | 28 // Returns the image for submenu arrow for current RTL setting. |
26 gfx::ImageSkia GetSubmenuArrowImage(SkColor icon_color); | 29 gfx::ImageSkia GetSubmenuArrowImage(SkColor icon_color); |
27 | 30 |
28 } // namespace views | 31 } // namespace views |
29 | 32 |
30 #endif // UI_VIEWS_CONTROLS_MENU_MENU_IMAGE_UTIL_H_ | 33 #endif // UI_VIEWS_CONTROLS_MENU_MENU_IMAGE_UTIL_H_ |
OLD | NEW |