From 820e9a488fa9a96e708a890ac882fdf826632912 Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Sat, 16 Jun 2012 18:46:59 +0000 Subject: mac: Fix close button appearance in HiDPI. Revert the explicit "scale" parts of r142304. In 10.7.3, the backing scale factor did not apply to shadowOffset and shadowBlurRadius. This appears fixed in 10.7.4, and retina MBPs ship with 10.7.4 -- so the manual scaling caused the scale to be applied twice, which moved the shadow off the close button. BUG=133134 TEST=look at a tab close button TBR=rsesek Review URL: https://chromiumcodereview.appspot.com/10556030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142607 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/molokocacao/NSBezierPath+MCAdditions.h | 2 +- third_party/molokocacao/NSBezierPath+MCAdditions.m | 4 ++-- third_party/molokocacao/README.chromium | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'third_party/molokocacao') diff --git a/third_party/molokocacao/NSBezierPath+MCAdditions.h b/third_party/molokocacao/NSBezierPath+MCAdditions.h index eb64479..f56660f 100644 --- a/third_party/molokocacao/NSBezierPath+MCAdditions.h +++ b/third_party/molokocacao/NSBezierPath+MCAdditions.h @@ -16,7 +16,7 @@ - (NSBezierPath*)pathWithStrokeWidth:(CGFloat)strokeWidth; -- (void)fillWithInnerShadow:(NSShadow *)shadow scale:(float)scale; +- (void)fillWithInnerShadow:(NSShadow *)shadow; - (void)drawBlurWithColor:(NSColor*)color radius:(CGFloat)radius; - (void)strokeInside; diff --git a/third_party/molokocacao/NSBezierPath+MCAdditions.m b/third_party/molokocacao/NSBezierPath+MCAdditions.m index 250a3ba..3761f34 100644 --- a/third_party/molokocacao/NSBezierPath+MCAdditions.m +++ b/third_party/molokocacao/NSBezierPath+MCAdditions.m @@ -92,7 +92,7 @@ static void CGPathCallback(void *info, const CGPathElement *element) #endif // MCBEZIER_USE_PRIVATE_FUNCTION } -- (void)fillWithInnerShadow:(NSShadow *)shadow scale:(float)scale +- (void)fillWithInnerShadow:(NSShadow *)shadow { [NSGraphicsContext saveGraphicsState]; @@ -102,7 +102,7 @@ static void CGPathCallback(void *info, const CGPathElement *element) NSRect bounds = NSInsetRect(self.bounds, -(ABS(offset.width) + radius), -(ABS(offset.height) + radius)); // The context's user transform isn't automatically applied to shadow offsets. - offset.height += scale * bounds.size.height; + offset.height += bounds.size.height; shadow.shadowOffset = offset; NSAffineTransform *transform = [NSAffineTransform transform]; if ([[NSGraphicsContext currentContext] isFlipped]) diff --git a/third_party/molokocacao/README.chromium b/third_party/molokocacao/README.chromium index 060b3cf..235c82a 100644 --- a/third_party/molokocacao/README.chromium +++ b/third_party/molokocacao/README.chromium @@ -13,4 +13,3 @@ shadows on paths, for example). Local Modifications: - Added LICENSE file based on email correspondence with Sean. - Added header guards. - - Added a "scale:" parameter to fillWithInnerShadow:. -- cgit v1.1