mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 09:22:07 +00:00
* Source/NSColor.m:
* Source/NSColorWell.m: Move code to draw the black and white triangles background for transparent colors to -[NSColor drawSwatchInRect:]. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37194 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e6357523a4
commit
a2975a65f0
3 changed files with 25 additions and 16 deletions
|
@ -197,22 +197,6 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
{
|
||||
return;
|
||||
}
|
||||
if ([_the_color alphaComponent] < 1.0)
|
||||
{
|
||||
NSBezierPath *triangle = [NSBezierPath bezierPath];
|
||||
|
||||
[[NSColor whiteColor] set];
|
||||
NSRectFill(insideRect);
|
||||
|
||||
[triangle moveToPoint: NSMakePoint(insideRect.origin.x,
|
||||
insideRect.origin.y + insideRect.size.height)];
|
||||
[triangle lineToPoint: NSMakePoint(insideRect.origin.x + insideRect.size.width,
|
||||
insideRect.origin.y + insideRect.size.height)];
|
||||
[triangle lineToPoint: insideRect.origin];
|
||||
[triangle closePath];
|
||||
[[NSColor blackColor] set];
|
||||
[triangle fill];
|
||||
}
|
||||
[_the_color drawSwatchInRect: insideRect];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue