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

Unified Diff: chrome/browser/views/frame/aero_glass_frame.cc

Issue 20161: Make aero glass code look more like other nonclient views in hopes of easing ... (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/views/frame/aero_glass_frame.cc
===================================================================
--- chrome/browser/views/frame/aero_glass_frame.cc (revision 9393)
+++ chrome/browser/views/frame/aero_glass_frame.cc (working copy)
@@ -15,10 +15,7 @@
// static
-// The width of the client edge to the left and right of the window.
-static const int kClientEdgeWidth = 3;
-// The height of the client edge to the bottom of the window.
-static const int kClientEdgeHeight = 2;
+static const int kClientEdgeThickness = 3;
HICON AeroGlassFrame::throbber_icons_[AeroGlassFrame::kThrobberIconCount];
@@ -50,10 +47,11 @@
titlebar_info.cbSize = sizeof(TITLEBARINFOEX);
SendMessage(GetHWND(), WM_GETTITLEBARINFOEX, 0, (WPARAM)&titlebar_info);
- RECT wr;
- GetWindowRect(&wr);
+ CPoint minimize_button_corner(titlebar_info.rgrect[2].left,
+ titlebar_info.rgrect[2].top);
+ MapWindowPoints(HWND_DESKTOP, GetHWND(), &minimize_button_corner, 1);
- return wr.right - titlebar_info.rgrect[2].left;
+ return minimize_button_corner.x;
}
///////////////////////////////////////////////////////////////////////////////
@@ -146,9 +144,9 @@
NCCALCSIZE_PARAMS* params = reinterpret_cast<NCCALCSIZE_PARAMS*>(l_param);
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
- params->rgrc[0].left += (border_thickness - kClientEdgeWidth);
- params->rgrc[0].right -= (border_thickness - kClientEdgeWidth);
- params->rgrc[0].bottom -= (border_thickness - kClientEdgeHeight);
+ params->rgrc[0].left += (border_thickness - kClientEdgeThickness);
+ params->rgrc[0].right -= (border_thickness - kClientEdgeThickness);
+ params->rgrc[0].bottom -= (border_thickness - kClientEdgeThickness);
UpdateDWMFrame();
@@ -180,10 +178,10 @@
if (!client_view())
return;
- MARGINS margins = { kClientEdgeWidth + 1,
- kClientEdgeWidth + 1,
+ MARGINS margins = { kClientEdgeThickness + 1,
+ kClientEdgeThickness + 1,
GetBoundsForTabStrip(browser_view_->tabstrip()).bottom(),
- kClientEdgeHeight + 1 };
+ kClientEdgeThickness + 1 };
// Note: we don't use DwmEnableBlurBehindWindow because any region not
// included in the glass region is composited source over. This means
// that anything drawn directly with GDI appears fully transparent.
« no previous file with comments | « chrome/browser/views/frame/aero_glass_frame.h ('k') | chrome/browser/views/frame/aero_glass_non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698