diff options
-rw-r--r-- | app/gfx/canvas_linux.cc | 9 | ||||
-rw-r--r-- | chrome/browser/gtk/tabs/tab_renderer_gtk.cc | 9 |
2 files changed, 2 insertions, 16 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); diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index 1c97373..849ca4a 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -606,14 +606,7 @@ void TabRendererGtk::Layout() { if (!is_pinned() || width() >= kPinnedTabRendererAsTabWidth) { // Size the Title text to fill the remaining space. int title_left = favicon_bounds_.right() + kFavIconTitleSpacing; - // Center of the text in the content area. - int center_of_text = kTopPadding + (content_height / 2); - // Distance between the top of the text and the middle of the text. - // (This should actually be fTop - fAscent / 2, but we can't access fTop - // here so this is as close as we can get.) - int title_offset = title_font_height_ - title_font_->baseline() / 2; - // Top of the text. - int title_top = center_of_text - title_offset; + int title_top = kTopPadding; // If the user has big fonts, the title will appear rendered too far down // on the y-axis if we use the regular top padding, so we need to adjust it |