Made change to prevent the color well's use when disabled.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20631 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-01-29 02:54:50 +00:00
parent 79e9a091e7
commit 7700675c89
2 changed files with 26 additions and 14 deletions

View file

@ -277,22 +277,29 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
- (void) mouseDown: (NSEvent *)theEvent
{
NSPoint point = [self convertPoint: [theEvent locationInWindow]
//
// OPENSTEP 4.2 and OSX behavior indicates that the colorwell doesn't
// work when the widget is marked as disabled.
//
if([self isEnabled])
{
NSPoint point = [self convertPoint: [theEvent locationInWindow]
fromView: nil];
if ([self mouse: point inRect: _wellRect])
{
[NSColorPanel dragColor: _the_color
withEvent: theEvent
fromView: self];
}
else if (_is_active == NO)
{
[self activate: YES];
}
else
{
[self deactivate];
if ([self mouse: point inRect: _wellRect])
{
[NSColorPanel dragColor: _the_color
withEvent: theEvent
fromView: self];
}
else if (_is_active == NO)
{
[self activate: YES];
}
else
{
[self deactivate];
}
}
}