diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 18:57:26 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 18:57:26 +0000 |
commit | 4426701e986b2345eb4741e02d7380374cb6f756 (patch) | |
tree | ed82431d4623188650d9586004df089216555585 /chrome | |
parent | d5937dff5bfa06d68262fc6d569cd5f5a6ac57c4 (diff) | |
download | chromium_src-4426701e986b2345eb4741e02d7380374cb6f756.zip chromium_src-4426701e986b2345eb4741e02d7380374cb6f756.tar.gz chromium_src-4426701e986b2345eb4741e02d7380374cb6f756.tar.bz2 |
Adjust the position of the frame background image for ChromeOS to match gtk build.
Gtk build is using non custom frame mode, which renders the frmae pixels
15 pixels above. I'll remove this hack once we migrate to views.
BUG=28580
TEST=None
Review URL: http://codereview.chromium.org/434011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32818 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/views/frame/opaque_browser_frame_view.cc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc index 5851cf0..6d8f9ce 100644 --- a/chrome/browser/views/frame/opaque_browser_frame_view.cc +++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc @@ -37,6 +37,10 @@ SkBitmap* OpaqueBrowserFrameView::distributor_logo_ = NULL; gfx::Font* OpaqueBrowserFrameView::title_font_ = NULL; +#if defined(OS_CHROMEOS) +const int kCustomFrameBackgroundVerticalOffset = 15; +#endif + namespace { // The frame border is only visible in restored mode and is hardcoded to 4 px on // each side regardless of the system window border size. @@ -690,7 +694,7 @@ void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) { // Window frame mode and color SkBitmap* theme_frame; - + int y = 0; // Never theme app and popup windows. if (!browser_view_->IsBrowserTypeNormal()) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); @@ -702,14 +706,24 @@ void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) { theme_frame = ShouldPaintAsActive() ? tp->GetBitmapNamed(IDR_THEME_FRAME) : tp->GetBitmapNamed(IDR_THEME_FRAME_INACTIVE); +#if defined(OS_CHROMEOS) + // TODO:(oshima): gtk based CHROMEOS is using non custom frame + // mode which does this adjustment. This should be removed + // once it's fully migrated to views. -1 is due to the layout + // difference between views and gtk and will be removed. + // See http://crbug.com/28580. + y = -kCustomFrameBackgroundVerticalOffset - 1; +#endif } else { theme_frame = ShouldPaintAsActive() ? tp->GetBitmapNamed(IDR_THEME_FRAME_INCOGNITO) : tp->GetBitmapNamed(IDR_THEME_FRAME_INCOGNITO_INACTIVE); +#if defined(OS_CHROMEOS) + y = -kCustomFrameBackgroundVerticalOffset - 1; +#endif } - // Draw the theme frame. - canvas->TileImageInt(*theme_frame, 0, 0, width(), theme_frame->height()); + canvas->TileImageInt(*theme_frame, 0, y, width(), theme_frame->height()); // Draw the theme frame overlay if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && |