|
From: | Fred Kiefer |
Subject: | Re: Question on GSDrawingFunctions |
Date: | Sun, 01 Feb 2004 12:43:19 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821 |
Jeff Teunissen wrote:
Fred Kiefer wrote:I just wanted to use the new GSDrawingFunction to allow NSButtonCell to draw in a configurable way, but than I did spot a few differences there. First NSButtonCell currently uses NSDrawGrayBezel, whereas GSDrawingFunctions only implements DrawDarkBezel. Now I did myself change NSDrawDarkBezel to call NSDrawGrayBezel, but am still unsure if this is actually correct. Could somebody with an OpenStep or Cocoa machine please test the difference between these two?It is NOT correct. GSDrawingFunctions does not use gray anywhere, and that's intentional. In addition, most of NSDraw* are documented and specified to draw gray, and this means they are unacceptable for drawing a "schemeable" UI, _and_ that they should not draw using the GSDrawingFunctions.
I don't want to upset you, but there may have been a misunderstanding. The question here was simply, if NSDrawDarkBezel and NSDrawGrayBezel are doing the same thing (both on OpenStep and MacOSX). I do know, what the GSDrawingFunctions code is for and, even if you do not notice, this question was part of an effort to enhance NSButton drawing. It may be strange, but this time I am on your side (at least I tried to be).
Once more: I don't want to change the implementation of the bezel drawing functions to use GSDrawingFunctions. (It was me that prevented a similar change some time ago) But perhaps we could correct the existing implementation if we find it was wrong. And I really would like to see more GSDrawingFunctions code used in the GNUstep widget drawing.
With that said I hope, we can work together to make GNUstep drawing more configurable.
There is also a small difference in the implementation of NSDrawGrayBezel and DrawDarkBezel. The second round of lines are drawn in a different order. This only is visible on very close inspection, still I wonder which way is correct and if we should change them to be the same. Again input from somebody with a reference impementation would be welcome.The result of DarkBezel (with default colors) is the same as OPENSTEP 4 NSDrawGrayBezel.
This should answer the second question. So the old code in NSDrawGrayBezel was wrong. Which just leaves the first question: Why did you call this DrawDarkBezel and not DrawGrayBezel? Is there a difference or not? And would you mind to send me a screen shot of the OpenStep result of NSDrawDarkBezel and NSDrawGrayBezel. With all this misunderstandings it seems better to check myself.
Up to now my understanding, based on the names of the functions, was that there used to be a series going from light to dark:
NSDrawWhiteBezel NSDrawLightBezel NSDrawGrayBezel NSDrawDarkBezelEven if we change the colours we use, we should stick with the differences, if there where any.
[Prev in Thread] | Current Thread | [Next in Thread] |