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

Unified Diff: ui/base/cocoa/underlay_opengl_hosting_window.mm

Issue 10444139: Proactive tweaking of window shadow code to try to fix problem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constants? Created 8 years, 7 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: ui/base/cocoa/underlay_opengl_hosting_window.mm
diff --git a/ui/base/cocoa/underlay_opengl_hosting_window.mm b/ui/base/cocoa/underlay_opengl_hosting_window.mm
index 8d96f36b79f7988f3592c7a5b6c4bfb237482590..df99b637462d18a6d3d134dc71bddca74b1b8af1 100644
--- a/ui/base/cocoa/underlay_opengl_hosting_window.mm
+++ b/ui/base/cocoa/underlay_opengl_hosting_window.mm
@@ -120,20 +120,23 @@ void RootDidAddSubview(id self, SEL _cmd, NSView* subview) {
NSView* rootView = [[self contentView] superview];
const NSRect rootBounds = [rootView bounds];
- const CGFloat kEdgeInset = 16;
- const CGFloat kAlphaValueJustOpaqueEnough = 0.002;
+ // On 10.7/8, the bottom corners of the window are rounded by magic at a
+ // deeper level than the NSThemeFrame, so it is OK to have the opaques
+ // go all the way to the bottom.
+ const CGFloat kTopEdgeInset = 16;
+ const CGFloat kAlphaValueJustOpaqueEnough = 0.003;
Nico 2012/06/01 17:07:23 Why the alpha value tweak?
scoped_nsobject<NSView> leftOpaque([[OpaqueView alloc] initWithFrame:
- NSMakeRect(NSMinX(rootBounds), NSMinY(rootBounds) + kEdgeInset,
- 1, NSHeight(rootBounds) - 2 * kEdgeInset)]);
+ NSMakeRect(NSMinX(rootBounds), NSMinY(rootBounds),
+ 1, NSHeight(rootBounds) - kTopEdgeInset)]);
[leftOpaque setAutoresizingMask:NSViewMaxXMargin |
NSViewHeightSizable];
[leftOpaque setAlphaValue:kAlphaValueJustOpaqueEnough];
[rootView addSubview:leftOpaque];
scoped_nsobject<NSView> rightOpaque([[OpaqueView alloc] initWithFrame:
- NSMakeRect(NSMaxX(rootBounds) - 1, NSMinY(rootBounds) + kEdgeInset,
- 1, NSHeight(rootBounds) - 2 * kEdgeInset)]);
+ NSMakeRect(NSMaxX(rootBounds) - 1, NSMinY(rootBounds),
+ 1, NSHeight(rootBounds) - kTopEdgeInset)]);
[rightOpaque setAutoresizingMask:NSViewMinXMargin |
NSViewHeightSizable];
[rightOpaque setAlphaValue:kAlphaValueJustOpaqueEnough];
« 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