Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8609)

Unified Diff: chrome/views/window/custom_frame_view.cc

Issue 56142: Merge r12900.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/window/custom_frame_view.cc
===================================================================
--- chrome/views/window/custom_frame_view.cc (revision 12934)
+++ chrome/views/window/custom_frame_view.cc (working copy)
@@ -317,6 +317,9 @@
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 @@
// 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 @@
// 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698