Rearrange coloration of NSDrawButton to match visually the result of the function on OpenStep.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10854 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
michael 2001-09-10 06:04:38 +00:00
parent 088fe40d5c
commit fa9637f045
2 changed files with 18 additions and 6 deletions

View file

@ -1,3 +1,15 @@
2001-09-09 Michael Hanni <mhanni@sprintmail.com>
* Source/Functions.m (NSDrawButton): rearrange the order of
coloring to take into account the nature of NSDrawTiledRects;
fixes visual irregularities (most noticeably in NSMenu).
2001-09-08 Michael Hanni <mhanni@sprintmail.com>
* Source/NSBrowser.m (-matrixInColumn:): Return nil if caller
requests column '-1'. Allows NSSave/OpenPanel to function. Hacky
though, why are we requesting column '-1' anyways?
2001-09-06 Adam Fedor <fedor@gnu.org> 2001-09-06 Adam Fedor <fedor@gnu.org>
* Source/NSView.m (-lockFocusInRect:): Switch back to gsave/grestore * Source/NSView.m (-lockFocusInRect:): Switch back to gsave/grestore

View file

@ -417,14 +417,14 @@ NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect,
void void
NSDrawButton(const NSRect aRect, const NSRect clipRect) NSDrawButton(const NSRect aRect, const NSRect clipRect)
{ {
NSRectEdge up_sides[] = {NSMinXEdge, NSMaxYEdge, NSRectEdge up_sides[] = {NSMaxXEdge, NSMinYEdge,
NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge,
NSMaxXEdge, NSMinYEdge}; NSMaxXEdge, NSMinYEdge};
NSRectEdge down_sides[] = {NSMinXEdge, NSMinYEdge, NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge,
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge,
NSMaxXEdge, NSMaxYEdge}; NSMaxXEdge, NSMaxYEdge};
float grays[] = {NSWhite, NSWhite, float grays[] = {NSBlack, NSBlack,
NSBlack, NSBlack, NSWhite, NSWhite,
NSDarkGray, NSDarkGray}; NSDarkGray, NSDarkGray};
NSRect rect; NSRect rect;
NSGraphicsContext *ctxt = GSCurrentContext(); NSGraphicsContext *ctxt = GSCurrentContext();