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

Unified Diff: ui/views/controls/menu/menu_separator_views.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.h ('k') | ui/views/controls/menu/submenu_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_separator_views.cc
diff --git a/ui/views/controls/menu/menu_separator_views.cc b/ui/views/controls/menu/menu_separator_views.cc
index c61cc594e926fe03c9e86cafb49bc08a005dfa66..61941366540d271ba7ce645b57372bda6be961f6 100644
--- a/ui/views/controls/menu/menu_separator_views.cc
+++ b/ui/views/controls/menu/menu_separator_views.cc
@@ -8,7 +8,6 @@
#include "ui/gfx/canvas.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/controls/menu/menu_config.h"
-#include "ui/views/controls/menu/menu_item_view.h"
namespace {
@@ -25,7 +24,7 @@ void MenuSeparator::OnPaint(gfx::Canvas* canvas) {
#endif
gfx::Size MenuSeparator::GetPreferredSize() const {
- const MenuConfig& menu_config = parent_menu_item_->GetMenuConfig();
+ const MenuConfig& menu_config = MenuConfig::instance();
int height = menu_config.separator_height;
switch(type_) {
case ui::SPACING_SEPARATOR:
@@ -61,7 +60,7 @@ gfx::Rect MenuSeparator::GetPaintBounds() {
}
gfx::Rect paint_rect(0, pos, width(), kSeparatorHeight);
- if (parent_menu_item_->GetMenuConfig().use_outer_border)
+ if (MenuConfig::instance().use_outer_border)
paint_rect.Inset(1, 0);
return paint_rect;
}
« no previous file with comments | « ui/views/controls/menu/menu_separator.h ('k') | ui/views/controls/menu/submenu_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698