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 "build/build_config.h" | 7 #include "base/macros.h" |
8 | 8 |
9 namespace views { | 9 namespace views { |
10 | 10 |
11 MenuConfig::MenuConfig(const ui::NativeTheme* theme) | 11 MenuConfig::MenuConfig() |
12 : arrow_color(SK_ColorBLACK), | 12 : arrow_color(SK_ColorBLACK), |
13 menu_vertical_border_size(3), | 13 menu_vertical_border_size(3), |
14 menu_horizontal_border_size(0), | 14 menu_horizontal_border_size(0), |
15 submenu_horizontal_inset(3), | 15 submenu_horizontal_inset(3), |
16 item_top_margin(4), | 16 item_top_margin(4), |
17 item_bottom_margin(3), | 17 item_bottom_margin(3), |
18 item_no_icon_top_margin(4), | 18 item_no_icon_top_margin(4), |
19 item_no_icon_bottom_margin(4), | 19 item_no_icon_bottom_margin(4), |
20 item_left_margin(10), | 20 item_left_margin(10), |
21 label_to_arrow_padding(10), | 21 label_to_arrow_padding(10), |
(...skipping 13 matching lines...) Expand all Loading... |
35 item_min_height(0), | 35 item_min_height(0), |
36 show_accelerators(true), | 36 show_accelerators(true), |
37 always_use_icon_to_label_padding(false), | 37 always_use_icon_to_label_padding(false), |
38 align_arrow_and_shortcut(false), | 38 align_arrow_and_shortcut(false), |
39 offset_context_menus(false), | 39 offset_context_menus(false), |
40 use_outer_border(true), | 40 use_outer_border(true), |
41 icons_in_label(false), | 41 icons_in_label(false), |
42 check_selected_combobox_item(false), | 42 check_selected_combobox_item(false), |
43 show_delay(400), | 43 show_delay(400), |
44 corner_radius(0) { | 44 corner_radius(0) { |
45 Init(theme); | 45 Init(); |
46 } | 46 } |
47 | 47 |
48 MenuConfig::~MenuConfig() {} | 48 MenuConfig::~MenuConfig() {} |
49 | 49 |
| 50 // static |
| 51 const MenuConfig& MenuConfig::instance() { |
| 52 CR_DEFINE_STATIC_LOCAL(MenuConfig, instance, ()); |
| 53 return instance; |
| 54 } |
| 55 |
50 } // namespace views | 56 } // namespace views |
OLD | NEW |