diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-11 19:24:25 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-11 19:24:25 +0000 |
commit | cf7bb0efce097c52735c5c168693897f8acd1ea3 (patch) | |
tree | 5ffdcf96c8150ca7a2844bec31f904a66b72ccac /chrome/browser/views | |
parent | f35fd7fea6e6ac6525a3c2b628e60c5cc9f4a7e8 (diff) | |
download | chromium_src-cf7bb0efce097c52735c5c168693897f8acd1ea3.zip chromium_src-cf7bb0efce097c52735c5c168693897f8acd1ea3.tar.gz chromium_src-cf7bb0efce097c52735c5c168693897f8acd1ea3.tar.bz2 |
Small fix to remove a pixel gap between the client edge of the toolbars and the client edge of the content area.
B=1031854
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/frame/opaque_non_client_view.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/views/frame/opaque_non_client_view.cc b/chrome/browser/views/frame/opaque_non_client_view.cc index 410e95a..235d901 100644 --- a/chrome/browser/views/frame/opaque_non_client_view.cc +++ b/chrome/browser/views/frame/opaque_non_client_view.cc @@ -851,9 +851,11 @@ void OpaqueNonClientView::PaintClientEdge(ChromeCanvas* canvas) { std::max(0, GetHeight() - frame_->client_view()->GetY() - toolbar_bounds.bottom() + fudge - kWindowVerticalBorderBottomSize)); + // Now the fudge inverts for app vs browser windows. + fudge = 1 - fudge; canvas->TileImageInt(*right, client_area_bounds.right(), - client_area_bounds.y() + 1, - right->width(), client_area_bounds.height() - 1); + client_area_bounds.y() + fudge, + right->width(), client_area_bounds.height() - fudge); canvas->DrawBitmapInt(*bottom_right, client_area_bounds.right(), client_area_bounds.bottom()); canvas->TileImageInt(*bottom, client_area_bounds.x(), @@ -863,21 +865,23 @@ void OpaqueNonClientView::PaintClientEdge(ChromeCanvas* canvas) { client_area_bounds.x() - bottom_left->width(), client_area_bounds.bottom()); canvas->TileImageInt(*left, client_area_bounds.x() - left->width(), - client_area_bounds.y() + 1, - left->width(), client_area_bounds.height() - 1); - + client_area_bounds.y() + fudge, + left->width(), client_area_bounds.height() - fudge); + if (frame_->window_delegate()->ShouldShowWindowTitle()) { SkBitmap app_top_left = resources()->app_top_left(); SkBitmap app_top_center = resources()->app_top_center(); SkBitmap app_top_right = resources()->app_top_right(); canvas->DrawBitmapInt(app_top_left, client_area_bounds.x() - app_top_left.width(), - client_area_bounds.y() - app_top_left.height() + 1); + client_area_bounds.y() - app_top_left.height() + + fudge); canvas->TileImageInt(app_top_center, client_area_bounds.x(), client_area_bounds.y() - app_top_center.height(), client_area_bounds.width(), app_top_center.height()); canvas->DrawBitmapInt(app_top_right, client_area_bounds.right(), - client_area_bounds.y() - app_top_right.height() + 1); + client_area_bounds.y() - app_top_right.height() + + fudge); } } |