| Index: ash/frame/header_painter_util.cc
|
| diff --git a/ash/frame/header_painter_util.cc b/ash/frame/header_painter_util.cc
|
| index 77123e6f4f8d2f93af26b03324dbb49139e6c265..ca838248ec5b96b6eb1a4a23ee4392df92ed034e 100644
|
| --- a/ash/frame/header_painter_util.cc
|
| +++ b/ash/frame/header_painter_util.cc
|
| @@ -74,10 +74,9 @@ gfx::Rect HeaderPainterUtil::GetTitleBounds(
|
| int x = icon ?
|
| icon->bounds().right() + kTitleIconOffsetX : kTitleNoIconOffsetX;
|
| int height = title_font_list.GetHeight();
|
| - int y = std::max(
|
| - 0,
|
| - static_cast<int>(std::ceil(
|
| - (caption_button_container->height() - height) / 2.0f)));
|
| + // Floor when computing the center of |caption_button_container| and when
|
| + // computing the center of the text.
|
| + int y = std::max(0, (caption_button_container->height() / 2) - (height / 2));
|
| int width = std::max(
|
| 0, caption_button_container->x() - kTitleCaptionButtonSpacing - x);
|
| return gfx::Rect(x, y, width, height);
|
|
|