mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 23:40:38 +00:00
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:
parent
79e9a091e7
commit
7700675c89
2 changed files with 26 additions and 14 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue