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

Unified Diff: ash/shell/app_list.cc

Issue 149383002: Clean-up: Replace Canvas::DrawStringInt with DrawStringRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed the build break. Created 6 years, 11 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 | « no previous file | ash/shell/lock_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/app_list.cc
diff --git a/ash/shell/app_list.cc b/ash/shell/app_list.cc
index 10e1a6146e1f50fa82ef8639422a6bce3ad8e2f7..c8e7acd64a70c93ba2c04ee39022efd2a4eda57b 100644
--- a/ash/shell/app_list.cc
+++ b/ash/shell/app_list.cc
@@ -25,9 +25,9 @@
#include "ui/app_list/search_result.h"
#include "ui/app_list/speech_ui_model.h"
#include "ui/gfx/canvas.h"
-#include "ui/gfx/font.h"
+#include "ui/gfx/font_list.h"
+#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/rect.h"
#include "ui/views/examples/examples_window_with_content.h"
namespace ash {
@@ -219,12 +219,12 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate {
const gfx::Size icon_size(32, 32);
gfx::Canvas canvas(icon_size, 1.0f, false /* is_opaque */);
- canvas.DrawStringInt(icon_text,
- gfx::Font(),
- SK_ColorBLACK,
- 0, 0, icon_size.width(), icon_size.height(),
- gfx::Canvas::TEXT_ALIGN_CENTER |
- gfx::Canvas::NO_SUBPIXEL_RENDERING);
+ canvas.DrawStringRectWithFlags(
+ icon_text,
+ gfx::FontList(),
+ SK_ColorBLACK,
+ gfx::Rect(icon_size),
+ gfx::Canvas::TEXT_ALIGN_CENTER | gfx::Canvas::NO_SUBPIXEL_RENDERING);
return gfx::ImageSkia(canvas.ExtractImageRep());
}
« no previous file with comments | « no previous file | ash/shell/lock_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698