[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnustep-cvs] r29106 - in /libs/gui/trunk: ChangeLog Source/NSColorW

From: Eric Wasylishen
Subject: Re: [Gnustep-cvs] r29106 - in /libs/gui/trunk: ChangeLog Source/NSColorWell.m
Date: Wed, 9 Dec 2009 16:35:28 -0700

Hi Fred,

On 2009-12-09, at 3:24 PM, Fred Kiefer wrote:

> Hans Baier schrieb:
>> Author: hansfbaier
>> Date: Tue Dec  8 08:55:39 2009
>> New Revision: 29106
>> URL:
>> Log:
>> * Source/NSColorWell.m (-mouseDragged:, -mouseDown:): Applied patch from 
>> Eric Wasylishen to activate it on click inside the colored rectangle (same 
>> behavior as in OS X)
>> Modified:
>>    libs/gui/trunk/ChangeLog
>>    libs/gui/trunk/Source/NSColorWell.m
> I like this patch in general, what I dislike is the global variable that
> gets used for the last mouse down position. Looking at the code I am
> very sure that this wont lead to any side effects, still it is the wrong
> way to code this. I would prefer that we come up with a better
> implementation for this feature.

I agree, the global variable is ugly. I did some more investigation
yesterday, and decided it would be best to use a mouse-tracking loop
in mouseDown and eliminate the global variable. OS X appears to 
do this as well.

I'm working on a new patch which fixes a bunch of little interaction 
details related to NSColorWell and NSColorPanel:

 - activation of the well should really happen on mouseUp, not mouseDown
 - non-bordered NSColorWells shouldn't be able to be activated by clicking
 - non-bordered NSColorWells should start a drag operation upon mouseDown
 - disabled NSColorWells shouldn't accept colours being dropped on them
 - dropping a colour on the well inside the NSColorPanel should
   also update the active NSColorWell

I just want to do a bit more testing, and I'll post the patch later tonight :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]