mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 21:10: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
|
@ -1,3 +1,8 @@
|
|||
2005-01-28 21:58 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSColorWell.m: [NSColorWell mouseDown:] prevent use
|
||||
of the colorwell when it's disabled.
|
||||
|
||||
2005-01-28 17:57 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSImageCell.m (-drawInteriorWithFrame:inView:): If our
|
||||
|
|
|
@ -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