Chromium Code Reviews| Index: ui/views/controls/menu/menu_host.cc |
| diff --git a/ui/views/controls/menu/menu_host.cc b/ui/views/controls/menu/menu_host.cc |
| index bea46ac169922e5271b83a90b6788360a65e1370..f5685c70b2c7a6871a3bbe8d9b7e3edebd90e8ed 100644 |
| --- a/ui/views/controls/menu/menu_host.cc |
| +++ b/ui/views/controls/menu/menu_host.cc |
| @@ -36,16 +36,24 @@ void MenuHost::InitMenuHost(Widget* parent, |
| params.has_dropshadow = true; |
| params.parent = parent ? parent->GetNativeView() : NULL; |
| params.bounds = bounds; |
| + |
| + const MenuConfig& menu_config = submenu_->GetMenuItem()->GetMenuConfig(); |
|
sky
2013/01/25 20:30:24
Can you make sure the MenuController is correctly
varunjain
2013/01/25 22:57:29
I think it does not matter if the controller exist
sky
2013/01/25 23:43:18
If the code falls back to MenuConfig::instance() t
varunjain
2013/01/28 20:58:01
my point is that the default value of corner radiu
|
| + if (menu_config.corner_radius > 0) |
| + params.transparent = true; |
| Init(params); |
| - if (ui::NativeTheme::IsNewMenuStyleEnabled()) { |
| + if (ui::NativeTheme::IsNewMenuStyleEnabled() && |
|
sky
2013/01/25 20:30:24
I tend to think this code isn't needed at all. Set
varunjain
2013/01/25 22:57:29
I think so too. But I am not very familiar with th
sky
2013/01/25 23:43:18
Nuke it.
varunjain
2013/01/28 20:58:01
Done.
|
| + menu_config.corner_radius > 0) { |
| // TODO(yefim): Investigate it more on aura. |
| gfx::Path path; |
| - RoundRectPainter::CreateRoundRectPath(bounds, &path); |
| + RoundRectPainter::CreateRoundRectPath(bounds, &path, |
| + menu_config.corner_radius); |
| SetShape(path.CreateNativeRegion()); |
| } |
| SetContentsView(contents_view); |
| + if (menu_config.corner_radius > 0) |
| + SetOpacity(0); |
| ShowMenuHost(do_capture); |
| } |