summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 20:16:48 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 20:16:48 +0000
commite1566d433ace378a312923322836f299a49a19d7 (patch)
treea9eea9f0d6170da8c5133e5c7bde370dfc100179 /chrome/views
parent9ea99c8ef61d3a40a0c7a9c471549b51cec6d445 (diff)
downloadchromium_src-e1566d433ace378a312923322836f299a49a19d7.zip
chromium_src-e1566d433ace378a312923322836f299a49a19d7.tar.gz
chromium_src-e1566d433ace378a312923322836f299a49a19d7.tar.bz2
Update non-browser windows to handle maximized mode layout changes. This should have been part of my changes in r11355, I overlooked it.
BUG=8372 Review URL: http://codereview.chromium.org/56121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12900 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/window/custom_frame_view.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/views/window/custom_frame_view.cc b/chrome/views/window/custom_frame_view.cc
index ecd675e..9c02f72 100644
--- a/chrome/views/window/custom_frame_view.cc
+++ b/chrome/views/window/custom_frame_view.cc
@@ -317,6 +317,9 @@ void CustomFrameView::GetWindowMask(const gfx::Size& size,
gfx::Path* window_mask) {
DCHECK(window_mask);
+ if (frame_->IsMaximized())
+ return;
+
// Redefine the window visible region for the new size.
window_mask->moveTo(0, 3);
window_mask->lineTo(1, 2);
@@ -392,8 +395,7 @@ void CustomFrameView::ButtonPressed(Button* sender) {
// CustomFrameView, private:
int CustomFrameView::FrameBorderThickness() const {
- return frame_->IsMaximized() ?
- GetSystemMetrics(SM_CXSIZEFRAME) : kFrameBorderThickness;
+ return frame_->IsMaximized() ? 0 : kFrameBorderThickness;
}
int CustomFrameView::NonClientBorderThickness() const {
@@ -570,13 +572,11 @@ void CustomFrameView::LayoutWindowControls() {
// button to the screen corner to obey Fitts' Law.
int right_extra_width = is_maximized ?
(kFrameBorderThickness - kFrameShadowThickness) : 0;
- int right_spacing = is_maximized ?
- (GetSystemMetrics(SM_CXSIZEFRAME) + right_extra_width) : frame_thickness;
gfx::Size close_button_size = close_button_->GetPreferredSize();
- close_button_->SetBounds(width() - close_button_size.width() - right_spacing,
- caption_y,
- close_button_size.width() + right_extra_width,
- close_button_size.height() + top_extra_height);
+ close_button_->SetBounds(width() - close_button_size.width() -
+ right_extra_width - frame_thickness, caption_y,
+ close_button_size.width() + right_extra_width,
+ close_button_size.height() + top_extra_height);
// When the window is restored, we show a maximized button; otherwise, we show
// a restore button.