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

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: 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_gtk.cc
diff --git a/views/controls/menu/menu_item_view_gtk.cc b/views/controls/menu/menu_item_view_gtk.cc
index 3c35a959f836e9c6219735b089f44e6c26850d9e..2245a2a307a03a6c7a3ed715bcd80f294dc490a9 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();
// TODO(sky): this is a workaround until I figure out why font.height()
// isn't returning the right thing. We really only want to include
// kFaviconSize if we're showing icons.
@@ -87,7 +87,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 +

Powered by Google App Engine
This is Rietveld 408576698