Use fred's approach for the colors

This commit is contained in:
Gregory John Casamento 2020-04-24 06:25:06 -04:00
parent 39601c0960
commit be756441aa

View file

@ -825,17 +825,20 @@
NSBezierPath *p;
NSPoint point;
CGFloat radius;
NSColor *backgroundColor = [NSColor selectedControlColor]; // onColor;
if (NSControlStateValueOn != v)
{
backgroundColor = [NSColor windowBackgroundColor]; // offColor;
}
NSColor *backgroundColor;
if (enabled == NO)
{
backgroundColor = [NSColor disabledControlTextColor];
}
else if (NSControlStateValueOn != v)
{
backgroundColor = [NSColor windowBackgroundColor]; // offColor
}
else
{
backgroundColor = [NSColor selectedControlColor]; // onColor
}
// make smaller than enclosing frame
frame = NSInsetRect(frame, 4, 4);