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

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

Issue 1514693006: Revert of Use a single views::MenuConfig instance for each platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase revert on https://codereview.chromium.org/1504743003 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 61941366540d271ba7ce645b57372bda6be961f6..c61cc594e926fe03c9e86cafb49bc08a005dfa66 100644
--- a/ui/views/controls/menu/menu_separator_views.cc
+++ b/ui/views/controls/menu/menu_separator_views.cc
@@ -8,6 +8,7 @@
#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 {
@@ -24,7 +25,7 @@ void MenuSeparator::OnPaint(gfx::Canvas* canvas) {
#endif
gfx::Size MenuSeparator::GetPreferredSize() const {
- const MenuConfig& menu_config = MenuConfig::instance();
+ const MenuConfig& menu_config = parent_menu_item_->GetMenuConfig();
int height = menu_config.separator_height;
switch(type_) {
case ui::SPACING_SEPARATOR:
@@ -60,7 +61,7 @@ gfx::Rect MenuSeparator::GetPaintBounds() {
}
gfx::Rect paint_rect(0, pos, width(), kSeparatorHeight);
- if (MenuConfig::instance().use_outer_border)
+ if (parent_menu_item_->GetMenuConfig().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