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 #include "ui/views/controls/menu/menu_config.h" | 5 #include "ui/views/controls/menu/menu_config.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "ui/views/controls/menu/menu_image_util.h" | 8 #include "ui/views/controls/menu/menu_image_util.h" |
| 9 #include "ui/views/round_rect_painter.h" |
9 | 10 |
10 namespace views { | 11 namespace views { |
11 | 12 |
12 MenuConfig::MenuConfig() | 13 MenuConfig::MenuConfig() |
13 : arrow_color(SK_ColorBLACK), | 14 : arrow_color(SK_ColorBLACK), |
14 menu_vertical_border_size(3), | 15 menu_vertical_border_size(3), |
15 menu_horizontal_border_size(0), | 16 menu_horizontal_border_size(views::RoundRectPainter::kBorderWidth), |
16 submenu_horizontal_inset(3), | 17 submenu_horizontal_inset(3), |
17 item_top_margin(4), | 18 item_top_margin(4), |
18 item_bottom_margin(3), | 19 item_bottom_margin(3), |
19 item_no_icon_top_margin(4), | 20 item_no_icon_top_margin(4), |
20 item_no_icon_bottom_margin(4), | 21 item_no_icon_bottom_margin(4), |
21 item_left_margin(10), | 22 item_left_margin(10), |
22 label_to_arrow_padding(10), | 23 label_to_arrow_padding(10), |
23 arrow_to_edge_padding(5), | 24 arrow_to_edge_padding(5), |
24 icon_to_label_padding(10), | 25 icon_to_label_padding(10), |
25 check_width(kMenuCheckSize), | 26 check_width(kMenuCheckSize), |
(...skipping 22 matching lines...) Expand all Loading... |
48 | 49 |
49 MenuConfig::~MenuConfig() {} | 50 MenuConfig::~MenuConfig() {} |
50 | 51 |
51 // static | 52 // static |
52 const MenuConfig& MenuConfig::instance() { | 53 const MenuConfig& MenuConfig::instance() { |
53 CR_DEFINE_STATIC_LOCAL(MenuConfig, instance, ()); | 54 CR_DEFINE_STATIC_LOCAL(MenuConfig, instance, ()); |
54 return instance; | 55 return instance; |
55 } | 56 } |
56 | 57 |
57 } // namespace views | 58 } // namespace views |
OLD | NEW |