Chromium Code Reviews| Index: ui/views/controls/menu/menu_config_mac.cc |
| diff --git a/ui/views/controls/menu/menu_config_mac.cc b/ui/views/controls/menu/menu_config_mac.cc |
| index fdd7de9da297ce9db37d60baa32e35a3bc0f50a7..5e054406f73e3b4e114db08289e671a2cde10da8 100644 |
| --- a/ui/views/controls/menu/menu_config_mac.cc |
| +++ b/ui/views/controls/menu/menu_config_mac.cc |
| @@ -4,10 +4,40 @@ |
| #include "ui/views/controls/menu/menu_config.h" |
| +#include "grit/ui_resources.h" |
| +#include "ui/base/resource/resource_bundle.h" |
| +#include "ui/gfx/image/image_skia.h" |
| +#include "ui/native_theme/native_theme_mac.h" |
| +#include "ui/views/controls/menu/menu_image_util.h" |
| + |
| namespace views { |
| void MenuConfig::Init(const ui::NativeTheme* theme) { |
| - NOTIMPLEMENTED(); |
| + // 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(
|
| + submenu_horizontal_inset = 1; |
| + arrow_to_edge_padding = 20; |
| + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| + arrow_width = rb.GetImageNamed(IDR_MENU_HIERARCHY_ARROW).Width(); |
| + gfx::ImageSkia check = GetMenuCheckImage(false); |
| + check_height = check.height(); |
| + item_min_height = 29; |
| + separator_spacing_height = 7; |
| + separator_lower_height = 8; |
| + separator_upper_height = 8; |
| + label_to_arrow_padding = 20; |
| + label_to_minor_text_padding = 20; |
| + always_use_icon_to_label_padding = true; |
| + align_arrow_and_shortcut = true; |
| + offset_context_menus = true; |
| + corner_radius = 2; |
| +} |
| + |
| +// static |
| +const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) { |
| + CR_DEFINE_STATIC_LOCAL(MenuConfig, |
| + mac_instance, |
| + (theme ? theme : ui::NativeTheme::instance())); |
| + return mac_instance; |
| } |
| } // namespace views |