mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Use fred's approach for the colors
This commit is contained in:
parent
39601c0960
commit
be756441aa
1 changed files with 10 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue