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
3 // found in the LICENSE file.
5 #include "ui/views/controls/menu/menu_config.h"
7 #include "build/build_config.h"
8 #include "ui/base/layout.h"
9 #include "ui/native_theme/native_theme.h"
13 MenuConfig::MenuConfig(const ui::NativeTheme* theme)
14 : text_color(SK_ColorBLACK),
15 arrow_color(SK_ColorBLACK),
16 menu_vertical_border_size(3),
17 menu_horizontal_border_size(0),
18 submenu_horizontal_inset(3),
20 item_bottom_margin(3),
21 item_no_icon_top_margin(4),
22 item_no_icon_bottom_margin(4),
24 label_to_arrow_padding(10),
25 arrow_to_edge_padding(5),
26 icon_to_label_padding(10),
36 separator_upper_height(3),
37 separator_lower_height(4),
38 separator_spacing_height(3),
40 show_mnemonics(false),
41 scroll_arrow_height(3),
42 label_to_minor_text_padding(10),
44 show_accelerators(true),
45 always_use_icon_to_label_padding(false),
46 align_arrow_and_shortcut(false),
47 offset_context_menus(false),
51 // Use 40px tall menu items when running in touch optimized mode.
52 // For Windows use 40px tall menu items when running in touch optimized mode.
53 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) {
54 item_top_margin = item_no_icon_top_margin = 12;
55 item_bottom_margin = item_no_icon_bottom_margin = 13;
60 MenuConfig::~MenuConfig() {}