summaryrefslogtreecommitdiffstats
path: root/third_party/molokocacao
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 18:46:59 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 18:46:59 +0000
commit820e9a488fa9a96e708a890ac882fdf826632912 (patch)
tree73a16e541c6bd2a19d361f03cba193d238fb6bd0 /third_party/molokocacao
parent274fd47adf3a817c820f662512210394f4e31578 (diff)
downloadchromium_src-820e9a488fa9a96e708a890ac882fdf826632912.zip
chromium_src-820e9a488fa9a96e708a890ac882fdf826632912.tar.gz
chromium_src-820e9a488fa9a96e708a890ac882fdf826632912.tar.bz2
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
Diffstat (limited to 'third_party/molokocacao')
-rw-r--r--third_party/molokocacao/NSBezierPath+MCAdditions.h2
-rw-r--r--third_party/molokocacao/NSBezierPath+MCAdditions.m4
-rw-r--r--third_party/molokocacao/README.chromium1
3 files changed, 3 insertions, 4 deletions
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:.