diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-28 02:20:05 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-28 02:20:05 +0000 |
commit | cd1b8530bbb6bb7351e2a54f0b23aedc16a4498a (patch) | |
tree | ad9b6c99c3a37d9395893c70d98b757c8d9023d1 /chrome | |
parent | 296d2ffad3adc619482b273ed6688f3e1361c61e (diff) | |
download | chromium_src-cd1b8530bbb6bb7351e2a54f0b23aedc16a4498a.zip chromium_src-cd1b8530bbb6bb7351e2a54f0b23aedc16a4498a.tar.gz chromium_src-cd1b8530bbb6bb7351e2a54f0b23aedc16a4498a.tar.bz2 |
Fix system menu positioning in fullscreen mode to be at the upper left corner of the screen.
BUG=8151
Review URL: http://codereview.chromium.org/28247
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10674 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/views/frame/aero_glass_non_client_view.cc | 17 | ||||
-rw-r--r-- | chrome/browser/views/frame/opaque_non_client_view.cc | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/views/frame/aero_glass_non_client_view.cc b/chrome/browser/views/frame/aero_glass_non_client_view.cc index cf8ba83..b3036ed 100644 --- a/chrome/browser/views/frame/aero_glass_non_client_view.cc +++ b/chrome/browser/views/frame/aero_glass_non_client_view.cc @@ -143,6 +143,9 @@ gfx::Rect AeroGlassNonClientView::CalculateClientAreaBounds(int width, gfx::Size AeroGlassNonClientView::CalculateWindowSizeForClientSize( int width, int height) const { + if (!browser_view_->IsTabStripVisible()) + return gfx::Size(width, height); + int border_thickness = NonClientBorderThickness(); return gfx::Size(width + (2 * border_thickness), height + NonClientTopBorderHeight() + border_thickness); @@ -151,14 +154,14 @@ gfx::Size AeroGlassNonClientView::CalculateWindowSizeForClientSize( gfx::Point AeroGlassNonClientView::GetSystemMenuPoint() const { gfx::Point system_menu_point; if (browser_view_->IsBrowserTypeNormal()) { - // The maximized mode bit here is because in maximized mode the frame edge + // The X coordinate conditional is because in maximized mode the frame edge // and the client edge are both offscreen, whereas in the opaque frame // (where we don't do this trick) maximized windows have no client edge and // only the frame edge is offscreen. system_menu_point.SetPoint(NonClientBorderThickness() - - (frame_->IsMaximized() ? 0 : kClientEdgeThickness), + (browser_view_->CanCurrentlyResize() ? kClientEdgeThickness : 0), NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() - - kClientEdgeThickness); + (browser_view_->IsFullscreen() ? 0 : kClientEdgeThickness)); } else { system_menu_point.SetPoint(0, -kFrameShadowThickness); } @@ -220,16 +223,16 @@ void AeroGlassNonClientView::ViewHierarchyChanged(bool is_add, // AeroGlassNonClientView, private: int AeroGlassNonClientView::FrameBorderThickness() const { - return GetSystemMetrics(SM_CXSIZEFRAME); + return browser_view_->IsFullscreen() ? 0 : GetSystemMetrics(SM_CXSIZEFRAME); } int AeroGlassNonClientView::NonClientBorderThickness() const { - return kNonClientBorderThickness; + return browser_view_->IsFullscreen() ? 0 : kNonClientBorderThickness; } int AeroGlassNonClientView::NonClientTopBorderHeight() const { - return FrameBorderThickness() + - (frame_->IsMaximized() ? 0 : kNonClientRestoredExtraThickness); + return FrameBorderThickness() + (browser_view_->CanCurrentlyResize() ? + kNonClientRestoredExtraThickness : 0); } void AeroGlassNonClientView::PaintDistributorLogo(ChromeCanvas* canvas) { diff --git a/chrome/browser/views/frame/opaque_non_client_view.cc b/chrome/browser/views/frame/opaque_non_client_view.cc index eeb1000..48d88db 100644 --- a/chrome/browser/views/frame/opaque_non_client_view.cc +++ b/chrome/browser/views/frame/opaque_non_client_view.cc @@ -472,7 +472,7 @@ gfx::Size OpaqueNonClientView::CalculateWindowSizeForClientSize( gfx::Point OpaqueNonClientView::GetSystemMenuPoint() const { gfx::Point system_menu_point(FrameBorderThickness(), NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() - - kClientEdgeThickness); + (browser_view_->IsFullscreen() ? 0 : kClientEdgeThickness)); ConvertPointToScreen(this, &system_menu_point); return system_menu_point; } |