Index: ui/views/controls/menu/menu_config_aura.cc |
diff --git a/ui/views/controls/menu/menu_config_aura.cc b/ui/views/controls/menu/menu_config_aura.cc |
index a49d44744a6ce369d6ddfec4e646193a512a9713..16342052cbe1d5671df7c08361bb9bdfc85fd86c 100644 |
--- a/ui/views/controls/menu/menu_config_aura.cc |
+++ b/ui/views/controls/menu/menu_config_aura.cc |
@@ -4,31 +4,24 @@ |
#include "ui/views/controls/menu/menu_config.h" |
-#include "ui/base/layout.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/gfx/image/image.h" |
#include "ui/gfx/image/image_skia.h" |
-#include "ui/native_theme/native_theme_aura.h" |
#include "ui/resources/grit/ui_resources.h" |
#include "ui/views/controls/menu/menu_image_util.h" |
-#include "ui/views/resources/grit/views_resources.h" |
namespace views { |
-namespace { |
-#if defined(OS_CHROMEOS) |
-static const int kMenuCornerRadiusForAura = 2; |
-#else |
-static const int kMenuCornerRadiusForAura = 0; |
-#endif |
-} // namespace |
- |
#if !defined(OS_WIN) |
void MenuConfig::Init(const ui::NativeTheme* theme) { |
- if (theme == ui::NativeThemeAura::instance()) |
- InitAura(theme); |
-} |
+// On Desktop Linux, always use the GTK config (MenuConfig member initializers), |
Evan Stade
2015/11/30 18:44:34
are you sure the MenuConfig member initializers ha
tapted
2015/12/01 07:35:09
Hm - that was the way I was reasoning about it, si
|
+// even for "Classic mode" on Linux (chrome://settings/#themes-reset). |
+// Note this causes --open-ash on Linux to use the Desktop Linux style as well. |
+#if defined(OS_CHROMEOS) |
+ InitAura(theme); |
#endif |
+} |
+#endif // OS_WIN |
void MenuConfig::InitAura(const ui::NativeTheme* theme) { |
Evan Stade
2015/11/30 18:44:34
|theme| isn't used; remove it?
tapted
2015/12/01 07:35:09
Done (removed from InitAura - removing from Init()
Evan Stade
2015/12/01 18:07:50
I think it's ok to peel the bandaid off all at onc
|
submenu_horizontal_inset = 1; |
@@ -46,7 +39,7 @@ void MenuConfig::InitAura(const ui::NativeTheme* theme) { |
always_use_icon_to_label_padding = true; |
align_arrow_and_shortcut = true; |
offset_context_menus = true; |
- corner_radius = kMenuCornerRadiusForAura; |
+ corner_radius = 2; |
sky
2015/11/30 16:54:33
Won't this change effect windows too?
tapted
2015/12/01 07:35:09
Ah, yes - it would change menus in Ash/Metro, whic
|
// In Ash, the border is provided by the shadow. |
use_outer_border = false; |
@@ -55,8 +48,7 @@ void MenuConfig::InitAura(const ui::NativeTheme* theme) { |
#if !defined(OS_WIN) |
// static |
const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) { |
- CR_DEFINE_STATIC_LOCAL(MenuConfig, instance, |
- (theme ? theme : ui::NativeThemeAura::instance())); |
+ CR_DEFINE_STATIC_LOCAL(MenuConfig, instance, (theme)); |
return instance; |
} |
#endif |