From b53c941c371b8aeb7cf229f05c1786a852f5e0cf Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 29 Jan 2010 02:14:25 +0000 Subject: [PATCH] Treat NSButtonCell's with a bezel style as being non-opaque git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29434 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSButtonCell.m | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5cb1daca..859f2405e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-28 Eric Wasylishen + + * Source/NSButtonCell.m -isOpaque: Return NO if the button cell has a + bezel style set. This is consistent with OS X, and fixes drawing + glitches seen in the GSTest NSButton test. + 2010-01-28 Eric Wasylishen * Headers/AppKit/NSButtonCell.h: Correct a typo: diff --git a/Source/NSButtonCell.m b/Source/NSButtonCell.m index ba1451f45..5268caa95 100644 --- a/Source/NSButtonCell.m +++ b/Source/NSButtonCell.m @@ -624,11 +624,13 @@ typedef struct _GSButtonCellFlags } /**

Returns whether the NSButtonCell is opaque. Returns YES if the button - cell is not transparent and if the cell is bordered. NO otherwise

+ cell is not transparent and if the cell is bordered and if there is no + bezel style, NO otherwise

*/ - (BOOL) isOpaque { - return !_buttoncell_is_transparent && _cell.is_bordered; + return !_buttoncell_is_transparent && _cell.is_bordered && + _bezel_style == 0; } - (NSBezelStyle) bezelStyle