OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/controls/menu/menu_item_view.h" | 5 #include "views/controls/menu/menu_item_view.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
9 #include "third_party/skia/include/effects/SkGradientShader.h" | 9 #include "third_party/skia/include/effects/SkGradientShader.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
11 #include "ui/gfx/canvas_skia.h" | 11 #include "ui/gfx/canvas_skia.h" |
12 #include "ui/gfx/favicon_size.h" | 12 #include "ui/gfx/favicon_size.h" |
13 #include "views/controls/button/text_button.h" | 13 #include "views/controls/button/text_button.h" |
14 #include "views/controls/menu/menu_config.h" | 14 #include "views/controls/menu/menu_config.h" |
15 #include "views/controls/menu/menu_image_util_gtk.h" | 15 #include "views/controls/menu/menu_image_util_linux.h" |
16 #include "views/controls/menu/submenu_view.h" | 16 #include "views/controls/menu/submenu_view.h" |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 | 19 |
20 // Background color when the menu item is selected. | 20 // Background color when the menu item is selected. |
21 #if defined(OS_CHROMEOS) | 21 #if defined(OS_CHROMEOS) |
22 static const SkColor kSelectedBackgroundColor = SkColorSetRGB(0xDC, 0xE4, 0xFA); | 22 static const SkColor kSelectedBackgroundColor = SkColorSetRGB(0xDC, 0xE4, 0xFA); |
23 #else | 23 #else |
24 static const SkColor kSelectedBackgroundColor = SkColorSetRGB(246, 249, 253); | 24 static const SkColor kSelectedBackgroundColor = SkColorSetRGB(246, 249, 253); |
25 #endif | 25 #endif |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 top_margin + (available_height - | 132 top_margin + (available_height - |
133 config.arrow_width) / 2, | 133 config.arrow_width) / 2, |
134 config.arrow_width, height()); | 134 config.arrow_width, height()); |
135 AdjustBoundsForRTLUI(&arrow_bounds); | 135 AdjustBoundsForRTLUI(&arrow_bounds); |
136 canvas->DrawBitmapInt(*GetSubmenuArrowImage(), | 136 canvas->DrawBitmapInt(*GetSubmenuArrowImage(), |
137 arrow_bounds.x(), arrow_bounds.y()); | 137 arrow_bounds.x(), arrow_bounds.y()); |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 } // namespace views | 141 } // namespace views |
OLD | NEW |