gnustep-dev
[Top][All Lists]
Advanced

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

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


From: Eric Wasylishen
Subject: Re: [Gnustep-cvs] r29106 - in /libs/gui/trunk: ChangeLog Source/NSColorWell.m
Date: Thu, 10 Dec 2009 02:26:18 -0700

Here's the new diff.

The one thing I'm not sure about is the best way to communicate to the
GSThemeDrawing method how the color well should be drawn. Potentially
a theme could want to draw the "currently-being-pressed" and "active
color well" states differently. Right now I use isHighlighted /
setHighlighted: on the NSColorWell's NSCell, but I don't think that's
right.

-Eric

On Wed, Dec 9, 2009 at 4:35 PM, Eric Wasylishen <address@hidden> wrote:
> 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: http://svn.gna.org/viewcvs/gnustep?rev=29106&view=rev
>>> 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 
> :-)
>
> Regards,
> Eric
>
>

Attachment: ColorWell2.diff
Description: Text Data


reply via email to

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