* Source/NSMenuView.m ([NSMenuView -trackWithEvent:]):

new tracking code. The menu feels snappier now (at least for me).

* Source/NSColorWell.m ([-activate:], [-deactivate])
  register/unregister for NSColorPanelColorChangedNotification.
  ([NSColorWell _takeColorFromPanel:]): new method to prevent endless
  loop when setting the well's color from the color panel.
  ([NSColorWell -initWithCoder:]): register for NSColorPboardType.

* Source/NSColorPanel.m ([NSColorPanel -_bottomWellAction:]):
  called when hitting one of the well at the bottom of the panel.
  Previous behaviour would not send a
  NSColorPanelColorChangedNotification.
  ([NSColorPanel -initWithCoder:]): update bottom wells construction to
  call _bottomWellAction: instead of takeColorFrom:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14853 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
pyr 2002-10-27 22:33:16 +00:00
parent bd896cbb66
commit 118c53a894
4 changed files with 50 additions and 36 deletions

View file

@ -324,7 +324,7 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
[well setBordered: NO];
[well setEnabled: NO];
[well setTarget: _colorWell];
[well setAction: @selector(takeColorFrom:)];
[well setAction: @selector(_bottomWellAction:)];
[swatchView addSubview: well];
RELEASE(well);
}
@ -355,6 +355,11 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
[_currentPicker setColor: [_colorWell color]];
}
- (void) _bottomWellAction: (id) sender
{
[self setColor: [sender color]];
}
@end
@implementation NSColorPanel