mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 05:10:47 +00:00
Fix suggested by Benhur
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4191 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b81c125b5e
commit
9f478f8a62
2 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon May 3 18:55:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
|
* Source/NSButtonCell.m: ([-drawWithFrame:inView:]) and
|
||||||
|
([-drawInteriorWithFrame:inView:]) respect ([-isTransparent])
|
||||||
|
|
||||||
1999-05-01 Adam Fedor <fedor@gnu.org>
|
1999-05-01 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Headers/gnustep/gui/NSGraphicsContext.h
|
* Headers/gnustep/gui/NSGraphicsContext.h
|
||||||
|
|
|
@ -386,6 +386,10 @@
|
||||||
// Save last view drawn to
|
// Save last view drawn to
|
||||||
[self setControlView: controlView];
|
[self setControlView: controlView];
|
||||||
|
|
||||||
|
// transparent buttons never draw
|
||||||
|
if ([self isTransparent])
|
||||||
|
return;
|
||||||
|
|
||||||
// do nothing if cell's frame rect is zero
|
// do nothing if cell's frame rect is zero
|
||||||
if (NSIsEmptyRect(cellFrame))
|
if (NSIsEmptyRect(cellFrame))
|
||||||
return;
|
return;
|
||||||
|
@ -414,7 +418,11 @@
|
||||||
NSString *titleToDisplay;
|
NSString *titleToDisplay;
|
||||||
NSSize imageSize = {0, 0};
|
NSSize imageSize = {0, 0};
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSColor *backgroundColor = [NSColor controlBackgroundColor];
|
NSColor *backgroundColor = nil;
|
||||||
|
|
||||||
|
// transparent buttons never draw
|
||||||
|
if ([self isTransparent])
|
||||||
|
return;
|
||||||
|
|
||||||
cellFrame = NSInsetRect(cellFrame, xDist, yDist);
|
cellFrame = NSInsetRect(cellFrame, xDist, yDist);
|
||||||
|
|
||||||
|
@ -433,6 +441,9 @@
|
||||||
backgroundColor = [NSColor selectedControlColor];
|
backgroundColor = [NSColor selectedControlColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (backgroundColor == nil)
|
||||||
|
backgroundColor = [NSColor controlBackgroundColor];
|
||||||
|
|
||||||
// set cell's background color
|
// set cell's background color
|
||||||
[backgroundColor set];
|
[backgroundColor set];
|
||||||
NSRectFill(cellFrame);
|
NSRectFill(cellFrame);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue