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

Unified Diff: views/controls/menu/menu_item_view.cc

Issue 7541002: Make NetworkMenuModel a ui::MenuModel again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better fix for NOTREACHED(). Created 9 years, 5 months 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
Index: views/controls/menu/menu_item_view.cc
diff --git a/views/controls/menu/menu_item_view.cc b/views/controls/menu/menu_item_view.cc
index eff0e39ea07b23120cea0f31f4e87eb02964d2e7..06766a634e7a58908e140de3f7af36a8a492b7b9 100644
--- a/views/controls/menu/menu_item_view.cc
+++ b/views/controls/menu/menu_item_view.cc
@@ -508,6 +508,14 @@ int MenuItemView::GetAcceleratorTextWidth() {
return text.empty() ? 0 : GetFont().GetStringWidth(text);
}
+void MenuItemView::set_margins(int top_margin, int bottom_margin) {
+ top_margin_ = top_margin;
+ bottom_margin_ = bottom_margin;
+
+ // invalidate GetPreferredSize() cache
+ pref_size_.SetSize(0,0);
+}
+
MenuItemView::MenuItemView(MenuItemView* parent,
int command,
MenuItemView::Type type)

Powered by Google App Engine
This is Rietveld 408576698