Chromium Code Reviews| Index: ui/views/controls/menu/menu_config.cc |
| diff --git a/ui/views/controls/menu/menu_config.cc b/ui/views/controls/menu/menu_config.cc |
| index 49be18967f6a9fef8018359b76b7db16634def9f..c6ff21d0081aa52a228dffc5ead7c8abc4acdb1c 100644 |
| --- a/ui/views/controls/menu/menu_config.cc |
| +++ b/ui/views/controls/menu/menu_config.cc |
| @@ -33,6 +33,9 @@ MenuConfig::MenuConfig() |
| arrow_width(9), |
| gutter_width(0), |
| separator_height(6), |
| + separator_upper_height(3), |
| + separator_lower_height(4), |
| + separator_spacing_height(3), |
| render_gutter(false), |
| show_mnemonics(false), |
| scroll_arrow_height(3), |
| @@ -41,11 +44,13 @@ MenuConfig::MenuConfig() |
| show_accelerators(true), |
| always_use_icon_to_label_padding(false), |
| align_arrow_and_shortcut(false) { |
| - // Use 40px tall menu items when running in touch optimized mode. |
| +#if defined (OS_WIN) |
|
sky
2012/08/21 22:53:32
THIS IS WRONG! YOU DON"T NEED THE IFDEF!
Mr4D (OOO till 08-26)
2012/08/21 23:16:01
Done.
|
| + // For Windows use 40px tall menu items when running in touch optimized mode. |
| if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { |
| item_top_margin = item_no_icon_top_margin = 12; |
| item_bottom_margin = item_no_icon_bottom_margin = 13; |
| } |
| +#endif |
| } |
| MenuConfig::~MenuConfig() {} |
| @@ -62,4 +67,14 @@ const MenuConfig& MenuConfig::instance() { |
| return *config_instance; |
| } |
| +// static |
| +const bool MenuConfig::IsNewMenu() { |
| +#if defined(USE_AURA) |
| + return true; |
| +#else |
| + return ui::GetDisplayLayout() == ui::LAYOUT_TOUCH; |
| +#endif |
| +} |
| + |
| + |
| } // namespace views |