bug-gnustep
[Top][All Lists]
Advanced

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

Re: [PATCH]: NSDraw functions with system colors


From: Fred Kiefer
Subject: Re: [PATCH]: NSDraw functions with system colors
Date: Tue, 06 May 2003 00:57:15 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903

Hi Adam,

I am really unsure if this patch is that good an idea. As I wrote when the Camaelon patch showed up the first time, you really need good reasons to deviate from all the published specifications. Some people may expect the functions to do what they are documented to do and those people will get frustrated. If we really want our button etc code to behave different from the specified functions we will have to use different operations to draw them. Which is not to hard as these functions themself show. Sorry, but I would not call the documentation ambiguous here, it is very clear on the fact that the internal rectangle gets filled. We can all agree that this is in many case the wrong behaviour, but these NSDrawColorTiledRects calls are so easy to use that we could place them in the actual border drawing code instead of the function calls. (And as I suggested, add a method _drawFrame: to NSCell to make changes and reuse easier) On the other hand, if somebody tests the original functions on OpenStep or MacOSX and finds that the behaviour is different from the specification, we should go ahead and implement that.

Fred

Adam Fedor wrote:
Following up on Nicolas' Camaelon package, this patch removes the rect fill and draws (some functions) with system colors. Both the OpenStep and MacOSX docs on this are terse and ambiguous (The usage of the functions conflicts with other documentation e.g. NSCell. MacOSX suggests that these aren't even used any more in their AppKit). In order to make these functions more useful, I've changed the functions to use system colors where appropriate, etc. I'll commit in a day or so if there are no objections.

2003-05-04  Adam Fedor  <fedor@gnu.org>

    * Source/Functions.m (NSDrawButton, NSDrawGroove, NSDrawFramePhoto):
    Don't fill rect. Use system colors
    (NSDrawGrayBezel, NSDrawWhiteBezel): Don't fill rect.
    (NSDrawDarkBezel): Implement like NSDrawGrayBezel with system colors.
    (NSDrawLightBezel): Idem like NSDrawWhiteBezel.






reply via email to

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