Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: ui/views/controls/menu/submenu_view.cc

Issue 1477253002: Use a single views::MenuConfig instance for each platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add menu_config_android Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_separator_views.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/submenu_view.cc
diff --git a/ui/views/controls/menu/submenu_view.cc b/ui/views/controls/menu/submenu_view.cc
index 5fba696e90001432a284579bd4c549cad5efc95e..1e2de11bd0311293e2c3b052f52a8a8a97141304 100644
--- a/ui/views/controls/menu/submenu_view.cc
+++ b/ui/views/controls/menu/submenu_view.cc
@@ -160,10 +160,9 @@ gfx::Size SubmenuView::GetPreferredSize() const {
child->GetPreferredSize().width());
}
}
- if (max_minor_text_width_ > 0) {
- max_minor_text_width_ +=
- GetMenuItem()->GetMenuConfig().label_to_minor_text_padding;
- }
+ if (max_minor_text_width_ > 0)
+ max_minor_text_width_ += MenuConfig::instance().label_to_minor_text_padding;
+
// Finish calculating our optimum width.
gfx::Insets insets = GetInsets();
int width = std::max(max_complex_width,
« no previous file with comments | « ui/views/controls/menu/menu_separator_views.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698