diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 06:42:06 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 06:42:06 +0000 |
commit | c761fa9ffa908f1a51310d69a8b8fbb41ce65eb2 (patch) | |
tree | d180266ed3553b9781053b43de0853e3c7574351 /app | |
parent | 9efc74c5259dadedf092936cbb7d43cd398e8e1a (diff) | |
download | chromium_src-c761fa9ffa908f1a51310d69a8b8fbb41ce65eb2.zip chromium_src-c761fa9ffa908f1a51310d69a8b8fbb41ce65eb2.tar.gz chromium_src-c761fa9ffa908f1a51310d69a8b8fbb41ce65eb2.tar.bz2 |
gtk: Get rid of the title-centering code in TabRendererGtk. DrawStringInt centers the text for us already. This change also removes a hack that modified the clipping rect unnecessarily.
BUG=20401,20610
TEST=none
Review URL: http://codereview.chromium.org/179037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/gfx/canvas_linux.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/gfx/canvas_linux.cc b/app/gfx/canvas_linux.cc index 6db12ea..521f54f 100644 --- a/app/gfx/canvas_linux.cc +++ b/app/gfx/canvas_linux.cc @@ -217,14 +217,7 @@ void Canvas::DrawStringInt(const std::wstring& text, y = y + ((h - (height / PANGO_SCALE)) / 2); } - // cairo_rectangle creates a rectangle with a border of 1px inclusive. The - // clipping region includes this border. cairo places the top-left corner of - // the rectangle at (x - 1, y - 1). We need the top-left corner of the - // rectangle to be at (x + 1, y + 2) so that we fully cover the extent of the - // text. - const int kClipXOffset = 1; - const int kClipYOffset = 2; - cairo_rectangle(cr, x + kClipXOffset, y + kClipYOffset, w, h); + cairo_rectangle(cr, x, y, w, h); cairo_clip(cr); cairo_move_to(cr, x, y); |