From e62090e3bd77a23a23e350d38776fd56dd8c74fc Mon Sep 17 00:00:00 2001 From: "beng@google.com" Date: Wed, 10 Sep 2008 18:05:11 +0000 Subject: Fix grab bag of AeroGlassFrame issues: - better names and documentation for varions kOnstants in the AeroGlassNonClientView - AeroGlassFrame now uses the actual bounds of the tabstrip to adjust the DWM frame, rather than hard-coding constants. - fix bug in hit testing that meant that tabs weren't selectable... wrong coordinate system used for one function call... not sure how this didn't affect XP?!! B=1031854 Review URL: http://codereview.chromium.org/1882 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1996 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/frame/aero_glass_frame.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'chrome/browser/views/frame/aero_glass_frame.cc') diff --git a/chrome/browser/views/frame/aero_glass_frame.cc b/chrome/browser/views/frame/aero_glass_frame.cc index 2ebbea4..2d7d4bf 100644 --- a/chrome/browser/views/frame/aero_glass_frame.cc +++ b/chrome/browser/views/frame/aero_glass_frame.cc @@ -191,10 +191,6 @@ void AeroGlassFrame::UpdateDWMFrame() { if (!client_view()) return; - // TODO(beng): when TabStrip is hooked up, obtain this offset from its - // bounds. - int toolbar_y = 36; - // We only adjust the DWM's glass rendering when we're a browser window or a // detached popup. App windows get the standard client edge. if (browser_view_->IsTabStripVisible() || @@ -208,8 +204,10 @@ void AeroGlassFrame::UpdateDWMFrame() { int client_edge_bottom_height = kWindowsDWMBevelSize; int client_edge_top_height = kWindowsDWMBevelSize; if (browser_view_->IsTabStripVisible()) { + gfx::Rect tabstrip_bounds = + GetBoundsForTabStrip(browser_view_->tabstrip()); client_edge_top_height = - client_view()->GetY() + kToolbarOverlapVertOffset + toolbar_y; + client_view()->GetY() + tabstrip_bounds.bottom(); } // Now poke the DWM. -- cgit v1.1