* Source/GSThemeTools.m: -[GSThemeTools drawRoundBezel:withColor:]

add code to draw highlights for rounded buttons to give them a 
	better 3D look.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28421 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-07-30 19:42:21 +00:00
parent 1871f18f54
commit debe8f5801
2 changed files with 29 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2009-07-30 15:43-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSThemeTools.m: -[GSThemeTools drawRoundBezel:withColor:]
add code to draw highlights for rounded buttons to give them a
better 3D look.
2009-07-28 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSDocument.m (-setFileName:): Set the file name to the

View file

@ -419,7 +419,10 @@
point = cellFrame.origin;
point.x += radius;
point.y += radius;
// Draw initial path to enclose the button...
// left half-circle
p = [NSBezierPath bezierPath];
[p appendBezierPathWithArcWithCenter: point
radius: radius
startAngle: 90.0
@ -440,6 +443,26 @@
// and stroke rounded button
[[NSColor shadowColor] set];
[p stroke];
// Add highlights...
point = cellFrame.origin;
point.x += radius;
point.y += radius;
p = [NSBezierPath bezierPath];
[p setLineWidth: 2.0];
[p appendBezierPathWithArcWithCenter: point
radius: radius
startAngle: 120.0
endAngle: 270.0];
// line to first point and right halfcircle
point.x += cellFrame.size.width - cellFrame.size.height;
[p appendBezierPathWithArcWithCenter: point
radius: radius
startAngle: 270.0
endAngle: 270.0];
[[NSColor controlLightHighlightColor] set];
[p stroke];
}
- (void) drawCircularBezel: (NSRect)cellFrame