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

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

Issue 6811025: Change status button menu implementation from Menu2 to MenuItemView. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Move NetworkMenuModel declaration into .cc. Created 9 years, 8 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
« no previous file with comments | « views/controls/menu/menu_item_view.cc ('k') | views/controls/menu/menu_item_view_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_item_view_gtk.cc
diff --git a/views/controls/menu/menu_item_view_gtk.cc b/views/controls/menu/menu_item_view_gtk.cc
index 17604e4bdd7fe984efd0d338c4f5cd9b296e32fc..aabe58bd79e99bbf8eb529804232eb3a5d9f9b74 100644
--- a/views/controls/menu/menu_item_view_gtk.cc
+++ b/views/controls/menu/menu_item_view_gtk.cc
@@ -25,7 +25,7 @@ static const SkColor kSelectedBackgroundColor = SkColorSetRGB(246, 249, 253);
#endif
gfx::Size MenuItemView::CalculatePreferredSize() {
- const gfx::Font& font = MenuConfig::instance().font;
+ const gfx::Font& font = GetFont();
return gfx::Size(
font.GetStringWidth(title_) + label_start_ +
item_right_margin_ + GetChildPreferredWidth(),
@@ -83,7 +83,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
SkColor fg_color =
IsEnabled() ? TextButton::kEnabledColor : TextButton::kDisabledColor;
#endif
- const gfx::Font& font = MenuConfig::instance().font;
+ const gfx::Font& font = GetFont();
int accel_width = parent_menu_item_->GetSubmenu()->max_accelerator_width();
int width = this->width() - item_right_margin_ - label_start_ - accel_width;
gfx::Rect text_bounds(label_start_, top_margin +
« no previous file with comments | « views/controls/menu/menu_item_view.cc ('k') | views/controls/menu/menu_item_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698