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

Unified Diff: ui/gfx/pango_util.cc

Issue 11293194: ui: Prefer +/- operators to apply offsets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: floats Created 8 years, 1 month 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
« .gitmodules ('K') | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/point.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/pango_util.cc
diff --git a/ui/gfx/pango_util.cc b/ui/gfx/pango_util.cc
index b3e102e6b85d0eef694a680597638018d73dd263..cd874c34663bb10204b567236af551365c550623 100644
--- a/ui/gfx/pango_util.cc
+++ b/ui/gfx/pango_util.cc
@@ -168,7 +168,7 @@ void DrawTextOntoCairoSurface(cairo_t* cr,
pango_layout_get_pixel_size(layout, &width, &height);
Rect text_rect(bounds.x(), bounds.y(), width, height);
// Vertically center |text_rect| in |bounds|.
- text_rect.Offset(0, (bounds.height() - text_rect.height()) / 2);
+ text_rect += gfx::Vector2d(0, (bounds.height() - text_rect.height()) / 2);
DrawPangoLayout(cr, layout, font, bounds, text_rect,
text_color, text_direction, flags);
« .gitmodules ('K') | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/point.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698