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

Unified Diff: views/drag_utils.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/textfield/textfield.cc ('k') | views/view_text_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/drag_utils.cc
===================================================================
--- views/drag_utils.cc (revision 55911)
+++ views/drag_utils.cc (working copy)
@@ -65,7 +65,7 @@
const int width = kFileDragImageMaxWidth;
// Add +2 here to allow room for the halo.
- const int height = font.height() + icon->height() +
+ const int height = font.GetHeight() + icon->height() +
kLinkDragImageVPadding + 2;
gfx::CanvasSkia canvas(width, height, false /* translucent */);
@@ -77,13 +77,13 @@
std::wstring name = file_util::GetFilenameFromPath(file_name);
canvas.DrawStringWithHalo(name, font, kFileDragImageTextColor, SK_ColorWHITE,
1, icon->height() + kLinkDragImageVPadding + 1,
- width - 2, font.height(),
+ width - 2, font.GetHeight(),
gfx::Canvas::TEXT_ALIGN_CENTER);
#else
std::wstring name = FilePath(file_name).BaseName().ToWStringHack();
canvas.DrawStringInt(name, font, kFileDragImageTextColor,
0, icon->height() + kLinkDragImageVPadding,
- width, font.height(), gfx::Canvas::TEXT_ALIGN_CENTER);
+ width, font.GetHeight(), gfx::Canvas::TEXT_ALIGN_CENTER);
#endif
SetDragImageOnDataObject(canvas, gfx::Size(width, height),
« no previous file with comments | « views/controls/textfield/textfield.cc ('k') | views/view_text_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698