summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 22:06:40 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 22:06:40 +0000
commitfc81ac2d712a65c951005a8905a1edc114a1c1ef (patch)
treed295e947157f2bd09fde08334aaa1e1e81c842a0 /chrome/views
parentcad01431b348b5c01ded71f05f2f30f8dcc41d22 (diff)
downloadchromium_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/views')
-rw-r--r--chrome/views/custom_frame_window.cc2
-rw-r--r--chrome/views/non_client_view.cc13
-rw-r--r--chrome/views/non_client_view.h3
3 files changed, 8 insertions, 10 deletions
diff --git a/chrome/views/custom_frame_window.cc b/chrome/views/custom_frame_window.cc
index 25dc089..91dbdd2 100644
--- a/chrome/views/custom_frame_window.cc
+++ b/chrome/views/custom_frame_window.cc
@@ -447,7 +447,7 @@ int DefaultNonClientView::NonClientHitTest(const gfx::Point& point) {
return HTSYSMENU;
component = GetHTComponentForFrame(point, kResizeAreaNorthSize,
- kResizeAreaSize, kResizeAreaSize, kResizeAreaCornerSize,
+ kResizeAreaSize, kResizeAreaCornerSize,
container_->window_delegate()->CanResize());
if (component == HTNOWHERE) {
// Finally fall back to the caption.
diff --git a/chrome/views/non_client_view.cc b/chrome/views/non_client_view.cc
index 2690a2d..cbf5636 100644
--- a/chrome/views/non_client_view.cc
+++ b/chrome/views/non_client_view.cc
@@ -10,12 +10,11 @@ const int NonClientView::kClientEdgeThickness = 1;
int NonClientView::GetHTComponentForFrame(const gfx::Point& point,
int top_resize_border_height,
- int resize_border_width,
- int bottom_resize_border_height,
+ int resize_border_thickness,
int resize_corner_size,
bool can_resize) {
int component = HTNOWHERE;
- if (point.x() < resize_border_width) {
+ if (point.x() < resize_border_thickness) {
if (point.y() < resize_corner_size) {
component = HTTOPLEFT;
} else if (point.y() >= (height() - resize_corner_size)) {
@@ -26,10 +25,10 @@ int NonClientView::GetHTComponentForFrame(const gfx::Point& point,
} else if (point.x() < resize_corner_size) {
if (point.y() < top_resize_border_height) {
component = HTTOPLEFT;
- } else if (point.y() >= (height() - bottom_resize_border_height)) {
+ } else if (point.y() >= (height() - resize_border_thickness)) {
component = HTBOTTOMLEFT;
}
- } else if (point.x() >= (width() - resize_border_width)) {
+ } else if (point.x() >= (width() - resize_border_thickness)) {
if (point.y() < resize_corner_size) {
component = HTTOPRIGHT;
} else if (point.y() >= (height() - resize_corner_size)) {
@@ -40,12 +39,12 @@ int NonClientView::GetHTComponentForFrame(const gfx::Point& point,
} else if (point.x() >= (width() - resize_corner_size)) {
if (point.y() < top_resize_border_height) {
component = HTTOPRIGHT;
- } else if (point.y() >= (height() - bottom_resize_border_height)) {
+ } else if (point.y() >= (height() - resize_border_thickness)) {
component = HTBOTTOMRIGHT;
}
} else if (point.y() < top_resize_border_height) {
component = HTTOP;
- } else if (point.y() >= (height() - bottom_resize_border_height)) {
+ } else if (point.y() >= (height() - resize_border_thickness)) {
component = HTBOTTOM;
}
diff --git a/chrome/views/non_client_view.h b/chrome/views/non_client_view.h
index 6619cf0..4dbf0e7 100644
--- a/chrome/views/non_client_view.h
+++ b/chrome/views/non_client_view.h
@@ -80,8 +80,7 @@ class NonClientView : public View {
// resized.
int GetHTComponentForFrame(const gfx::Point& point,
int top_resize_border_height,
- int resize_border_width,
- int bottom_resize_border_height,
+ int resize_border_thickness,
int resize_corner_size,
bool can_resize);