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

Side by Side Diff: chrome/browser/views/frame/aero_glass_non_client_view.cc

Issue 27115: Fix system menu positioning a bit. In Aero glass, the maximized mode menu wa... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/views/frame/opaque_non_client_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/frame/aero_glass_non_client_view.h" 5 #include "chrome/browser/views/frame/aero_glass_non_client_view.h"
6 6
7 #include "chrome/browser/views/frame/browser_view.h" 7 #include "chrome/browser/views/frame/browser_view.h"
8 #include "chrome/browser/views/tabs/tab_strip.h" 8 #include "chrome/browser/views/tabs/tab_strip.h"
9 #include "chrome/common/resource_bundle.h" 9 #include "chrome/common/resource_bundle.h"
10 #include "chrome/views/client_view.h" 10 #include "chrome/views/client_view.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 int width, 144 int width,
145 int height) const { 145 int height) const {
146 int border_thickness = NonClientBorderThickness(); 146 int border_thickness = NonClientBorderThickness();
147 return gfx::Size(width + (2 * border_thickness), 147 return gfx::Size(width + (2 * border_thickness),
148 height + NonClientTopBorderHeight() + border_thickness); 148 height + NonClientTopBorderHeight() + border_thickness);
149 } 149 }
150 150
151 gfx::Point AeroGlassNonClientView::GetSystemMenuPoint() const { 151 gfx::Point AeroGlassNonClientView::GetSystemMenuPoint() const {
152 gfx::Point system_menu_point; 152 gfx::Point system_menu_point;
153 if (browser_view_->IsTabStripVisible()) { 153 if (browser_view_->IsTabStripVisible()) {
154 system_menu_point.SetPoint( 154 // The maximized mode bit here is because in maximized mode the frame edge
155 NonClientBorderThickness() - kClientEdgeThickness, 155 // and the client edge are both offscreen, whereas in the opaque frame
156 NonClientTopBorderHeight() + browser_view_->GetTabStripHeight()); 156 // (where we don't do this trick) maximized windows have no client edge and
157 // only the frame edge is offscreen.
158 system_menu_point.SetPoint(NonClientBorderThickness() -
159 (frame_->IsMaximized() ? 0 : kClientEdgeThickness),
160 NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() -
161 kClientEdgeThickness);
157 } else { 162 } else {
158 system_menu_point.SetPoint(0, -kFrameShadowThickness); 163 system_menu_point.SetPoint(0, -kFrameShadowThickness);
159 } 164 }
160 ConvertPointToScreen(this, &system_menu_point); 165 ConvertPointToScreen(this, &system_menu_point);
161 return system_menu_point; 166 return system_menu_point;
162 } 167 }
163 168
164 int AeroGlassNonClientView::NonClientHitTest(const gfx::Point& point) { 169 int AeroGlassNonClientView::NonClientHitTest(const gfx::Point& point) {
165 // If we don't have a tabstrip, we haven't customized the frame, so Windows 170 // If we don't have a tabstrip, we haven't customized the frame, so Windows
166 // can figure this out. If the point isn't within our bounds, then it's in 171 // can figure this out. If the point isn't within our bounds, then it's in
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 353
349 #if defined(GOOGLE_CHROME_BUILD) 354 #if defined(GOOGLE_CHROME_BUILD)
350 distributor_logo_ = ResourceBundle::GetSharedInstance(). 355 distributor_logo_ = ResourceBundle::GetSharedInstance().
351 GetBitmapNamed(IDR_DISTRIBUTOR_LOGO); 356 GetBitmapNamed(IDR_DISTRIBUTOR_LOGO);
352 #endif 357 #endif
353 358
354 initialized = true; 359 initialized = true;
355 } 360 }
356 } 361 }
357 362
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/frame/opaque_non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698