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

Unified Diff: views/controls/menu/menu_item_view_win.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: Changed refcount guard to use OS_CHROMEOS. 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
Index: views/controls/menu/menu_item_view_win.cc
diff --git a/views/controls/menu/menu_item_view_win.cc b/views/controls/menu/menu_item_view_win.cc
index e71f8c11c77754fca14bd2cc56bb040c85951ada..409dc4bcc8f1bc6456d0fa3376e7e40b37120c29 100644
--- a/views/controls/menu/menu_item_view_win.cc
+++ b/views/controls/menu/menu_item_view_win.cc
@@ -18,7 +18,7 @@ using gfx::NativeTheme;
namespace views {
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(),
@@ -82,7 +82,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
SkColor fg_color = gfx::NativeThemeWin::instance()->GetThemeColorWithDefault(
gfx::NativeThemeWin::MENU, MENU_POPUPITEM, state, TMT_TEXTCOLOR,
default_sys_color);
- 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, width, font.GetHeight());
« views/controls/menu/menu_item_view.cc ('K') | « views/controls/menu/menu_item_view_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698