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 "build/build_config.h" |
8 #include "ui/base/layout.h" | 8 #include "ui/base/layout.h" |
9 #include "ui/native_theme/native_theme.h" | 9 #include "ui/native_theme/native_theme.h" |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 scroll_arrow_height(3), | 38 scroll_arrow_height(3), |
39 label_to_minor_text_padding(10), | 39 label_to_minor_text_padding(10), |
40 item_min_height(0), | 40 item_min_height(0), |
41 show_accelerators(true), | 41 show_accelerators(true), |
42 always_use_icon_to_label_padding(false), | 42 always_use_icon_to_label_padding(false), |
43 align_arrow_and_shortcut(false), | 43 align_arrow_and_shortcut(false), |
44 offset_context_menus(false), | 44 offset_context_menus(false), |
45 native_theme(theme), | 45 native_theme(theme), |
46 show_delay(400), | 46 show_delay(400), |
47 corner_radius(0) { | 47 corner_radius(0) { |
48 // Use 40px tall menu items when running in touch optimized mode. | |
49 // For Windows use 40px tall menu items when running in touch optimized mode. | |
50 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { | |
51 item_top_margin = item_no_icon_top_margin = 12; | |
52 item_bottom_margin = item_no_icon_bottom_margin = 13; | |
53 } | |
54 Init(theme); | 48 Init(theme); |
55 } | 49 } |
56 | 50 |
57 MenuConfig::~MenuConfig() {} | 51 MenuConfig::~MenuConfig() {} |
58 | 52 |
59 } // namespace views | 53 } // namespace views |
OLD | NEW |