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

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

Issue 3083022: Rework gfx::Font by moving platform-specific code into inner classes.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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_win.cc ('k') | views/controls/menu/native_menu_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_win.cc
===================================================================
--- views/controls/menu/menu_win.cc (revision 55911)
+++ views/controls/menu/menu_win.cc (working copy)
@@ -112,7 +112,7 @@
// If the label contains an accelerator, make room for tab.
if (data->label.find(L'\t') != std::wstring::npos)
lpmis->itemWidth += font.GetStringWidth(L" ");
- lpmis->itemHeight = font.height() + kItemBottomMargin + kItemTopMargin;
+ lpmis->itemHeight = font.GetHeight() + kItemBottomMargin + kItemTopMargin;
} else {
// Measure separator size.
lpmis->itemHeight = GetSystemMetrics(SM_CYMENU) / 2;
@@ -158,8 +158,9 @@
if (!underline_mnemonics)
format |= DT_HIDEPREFIX;
gfx::Font font;
- HGDIOBJ old_font = static_cast<HFONT>(SelectObject(hDC, font.hfont()));
- int fontsize = font.FontSize();
+ HGDIOBJ old_font =
+ static_cast<HFONT>(SelectObject(hDC, font.GetNativeFont()));
+ int fontsize = font.GetFontSize();
// If an accelerator is specified (with a tab delimiting the rest of the
// label from the accelerator), we have to justify the fist part on the
« no previous file with comments | « views/controls/menu/menu_item_view_win.cc ('k') | views/controls/menu/native_menu_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698