diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 22:06:40 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 22:06:40 +0000 |
commit | fc81ac2d712a65c951005a8905a1edc114a1c1ef (patch) | |
tree | d295e947157f2bd09fde08334aaa1e1e81c842a0 /chrome/browser/views/frame/browser_view.cc | |
parent | cad01431b348b5c01ded71f05f2f30f8dcc41d22 (diff) | |
download | chromium_src-fc81ac2d712a65c951005a8905a1edc114a1c1ef.zip chromium_src-fc81ac2d712a65c951005a8905a1edc114a1c1ef.tar.gz chromium_src-fc81ac2d712a65c951005a8905a1edc114a1c1ef.tar.bz2 |
Per Glen, remove the bottom border of maximized windows. I went ahead and also removed support for window frame sizes with unequal widths vs. heights; Windows' UI doesn't actually let you do this and it was making the code more complex than it needed to be.
Review URL: http://codereview.chromium.org/19477
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame/browser_view.cc')
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index 5197b34..080c044 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -46,6 +46,7 @@ #include "chrome/common/resource_bundle.h" #include "chrome/common/win_util.h" #include "chrome/views/hwnd_notification_source.h" +#include "chrome/views/non_client_view.h" #include "chrome/views/view.h" #include "chrome/views/window.h" @@ -64,10 +65,8 @@ static const int kToolbarTabStripVerticalOverlap = 3; static const int kTabShadowSize = 2; // The height of the status bubble. static const int kStatusBubbleHeight = 20; -// The overlap of the status bubble with the left edge of the window. -static const int kStatusBubbleHorizontalOverlap = 2; -// The overlap of the status bubble with the bottom edge of the window. -static const int kStatusBubbleVerticalOverlap = 2; +// The overlap of the status bubble with the window frame. +static const int kStatusBubbleOverlap = 1; // An offset distance between certain toolbars and the toolbar that preceded // them in layout. static const int kSeparationLineHeight = 1; @@ -890,7 +889,6 @@ int BrowserView::NonClientHitTest(const gfx::Point& point) { // might be a popup window without a TabStrip, or the TabStrip could be // animating. if (IsTabStripVisible() && tabstrip_->CanProcessInputEvents()) { - views::Window* window = frame_->GetWindow(); gfx::Point point_in_view_coords(point); View::ConvertPointToView(GetParent(), this, &point_in_view_coords); @@ -906,7 +904,7 @@ int BrowserView::NonClientHitTest(const gfx::Point& point) { // The top few pixels of the TabStrip are a drop-shadow - as we're pretty // starved of dragable area, let's give it to window dragging (this also // makes sense visually). - if (!window->IsMaximized() && + if (!IsMaximized() && (point_in_view_coords.y() < tabstrip_->y() + kTabShadowSize)) { // We return HTNOWHERE as this is a signal to our containing // NonClientView that it should figure out what the correct hit-test @@ -1172,8 +1170,11 @@ int BrowserView::LayoutDownloadShelf() { } void BrowserView::LayoutStatusBubble(int top) { - gfx::Point origin(-kStatusBubbleHorizontalOverlap, - top - kStatusBubbleHeight + kStatusBubbleVerticalOverlap); + // In restored mode, the client area has a client edge between it and the + // frame. + int overlap = kStatusBubbleOverlap + + (IsMaximized() ? 0 : views::NonClientView::kClientEdgeThickness); + gfx::Point origin(-overlap, top - kStatusBubbleHeight + overlap); ConvertPointToView(this, GetParent(), &origin); status_bubble_->SetBounds(origin.x(), origin.y(), width() / 3, kStatusBubbleHeight); |