OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "grit/ui_resources.h" | |
8 #include "ui/base/resource/resource_bundle.h" | |
9 #include "ui/gfx/image/image_skia.h" | |
10 #include "ui/native_theme/native_theme_mac.h" | |
11 #include "ui/views/controls/menu/menu_image_util.h" | |
12 | |
7 namespace views { | 13 namespace views { |
8 | 14 |
9 void MenuConfig::Init(const ui::NativeTheme* theme) { | 15 void MenuConfig::Init(const ui::NativeTheme* theme) { |
10 NOTIMPLEMENTED(); | 16 // TODO: Tune these parameters for Mac. |
tapted
2014/05/08 00:25:28
nit: TODOs should have a username in brackets - us
Andre
2014/05/09 01:10:01
Ok, deleted them and replaced with NOTIMPLEMENTED(
| |
17 submenu_horizontal_inset = 1; | |
18 arrow_to_edge_padding = 20; | |
19 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | |
20 arrow_width = rb.GetImageNamed(IDR_MENU_HIERARCHY_ARROW).Width(); | |
21 gfx::ImageSkia check = GetMenuCheckImage(false); | |
22 check_height = check.height(); | |
23 item_min_height = 29; | |
24 separator_spacing_height = 7; | |
25 separator_lower_height = 8; | |
26 separator_upper_height = 8; | |
27 label_to_arrow_padding = 20; | |
28 label_to_minor_text_padding = 20; | |
29 always_use_icon_to_label_padding = true; | |
30 align_arrow_and_shortcut = true; | |
31 offset_context_menus = true; | |
32 corner_radius = 2; | |
33 } | |
34 | |
35 // static | |
36 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) { | |
37 CR_DEFINE_STATIC_LOCAL(MenuConfig, | |
38 mac_instance, | |
39 (theme ? theme : ui::NativeTheme::instance())); | |
40 return mac_instance; | |
11 } | 41 } |
12 | 42 |
13 } // namespace views | 43 } // namespace views |
OLD | NEW |