mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
* Source/NSColorPanel.m (-_initWithoutGModel): Correct target for
bottom wells. * Source/NSColorWell.m (-performClick:): Add this method and use it in -mouseUp:. Patch by Josh Freeman <pikopixel@twilightedge.com>. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@40228 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a944200159
commit
0772d452fb
3 changed files with 22 additions and 9 deletions
|
@ -1,3 +1,11 @@
|
|||
2016-11-21 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSColorPanel.m (-_initWithoutGModel): Correct target for
|
||||
bottom wells.
|
||||
* Source/NSColorWell.m (-performClick:): Add this method and use
|
||||
it in -mouseUp:.
|
||||
Patch by Josh Freeman <pikopixel@twilightedge.com>.
|
||||
|
||||
2016-10-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSBitmapImageRep.m: Set the TIFF subfield type to 0
|
||||
|
|
|
@ -350,7 +350,7 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
|||
[well setColor: colour];
|
||||
[well setBordered: NO];
|
||||
[well setEnabled: YES];
|
||||
[well setTarget: _colorWell];
|
||||
[well setTarget: self];
|
||||
[well setAction: @selector(_bottomWellAction:)];
|
||||
[swatchView addSubview: well];
|
||||
RELEASE(well);
|
||||
|
|
|
@ -366,14 +366,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
|
||||
if (inside)
|
||||
{
|
||||
if (_is_active == NO)
|
||||
{
|
||||
[self activate: YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self deactivate];
|
||||
}
|
||||
[self performClick: self];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -382,6 +375,18 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
return [self color];
|
||||
}
|
||||
|
||||
- (void) performClick: (id)sender
|
||||
{
|
||||
if ([self isActive])
|
||||
{
|
||||
[self deactivate];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self activate: YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) performDragOperation: (id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSPasteboard *pb = [sender draggingPasteboard];
|
||||
|
|
Loading…
Reference in a new issue