Revision: 5338
http://skim-app.svn.sourceforge.net/skim-app/?rev=5338&view=rev
Author: hofman
Date: 2009-04-29 16:55:54 +0000 (Wed, 29 Apr 2009)
Log Message:
-----------
use shadow
Modified Paths:
--------------
trunk/SKSplitView.m
Modified: trunk/SKSplitView.m
===================================================================
--- trunk/SKSplitView.m 2009-04-28 13:06:21 UTC (rev 5337)
+++ trunk/SKSplitView.m 2009-04-29 16:55:54 UTC (rev 5338)
@@ -156,42 +156,33 @@
// Draw the handle
NSPoint startPoint, endPoint;
CGFloat handleSize = 20.0;
- NSColor *darkColor = [NSColor colorWithCalibratedWhite:0.6 alpha:1.0];
- NSColor *lightColor = [NSColor colorWithCalibratedWhite:0.95 alpha:1.0];
+ NSShadow *shade = [[[NSShadow alloc] init] autorelease];
+ [shade setShadowBlurRadius:0.0];
+ [shade setShadowColor:[NSColor colorWithCalibratedWhite:0.95 alpha:1.0]];
[NSBezierPath setDefaultLineWidth:1.0];
if ([self isVertical]) {
handleSize = SKMin(handleSize, 2.0 * SKFloor(0.5 * NSHeight(aRect)));
startPoint = NSMakePoint(NSMinX(aRect) + 1.5, NSMidY(aRect) - 0.5 *
handleSize);
endPoint = NSMakePoint(startPoint.x, startPoint.y + handleSize);
- [darkColor set];
+ [shade setShadowOffset:NSMakeSize(1.0, 0.0)];
+ [shade set];
+ [[NSColor colorWithCalibratedWhite:0.6 alpha:1.0] set];
[NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
startPoint.x += 2.0;
endPoint.x += 2.0;
[NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
- [lightColor set];
- startPoint.x -= 1.0;
- endPoint.x -= 1.0;
- [NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
- startPoint.x += 2.0;
- endPoint.x += 2.0;
- [NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
} else {
handleSize = SKMin(handleSize, 2.0 * SKFloor(0.5 * NSWidth(aRect)));
startPoint = NSMakePoint(NSMidX(aRect) - 0.5 * handleSize,
NSMinY(aRect) + 1.5);
endPoint = NSMakePoint(startPoint.x + handleSize, startPoint.y);
- [darkColor set];
+ [shade setShadowOffset:NSMakeSize(0.0, -1.0)];
+ [shade set];
+ [[NSColor colorWithCalibratedWhite:0.6 alpha:1.0] set];
[NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
startPoint.y += 2.0;
endPoint.y += 2.0;
[NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
- [lightColor set];
- startPoint.y -= 1.0;
- endPoint.y -= 1.0;
- [NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
- startPoint.y += 2.0;
- endPoint.y += 2.0;
- [NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
}
[NSGraphicsContext restoreGraphicsState];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit