raw text with attributes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3860 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-03-05 16:40:39 +00:00
parent fab177a1ae
commit 5da8919ec9
2 changed files with 8 additions and 4 deletions

View file

@ -1,4 +1,4 @@
Fri Mar 5 14:46:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Fri Mar 5 16:04:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Headers/AppKit/NSGraphicsContext.h: Added three new methods to
support focusing - ([-focusView]), ([-pushFocusView:]) and
@ -7,6 +7,7 @@ Fri Mar 5 14:46:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
a little, and made graphocs contexts thread-safe.
* Source/NSView.m: Removed old code to handle per-thread stack of
focussed views - use new code in NSGraphicsContext instead.
* Source/NSCell.m: Draw cell text with font and colour attributes.
Thu Mar 4 12:46:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>

View file

@ -552,6 +552,7 @@
NSFont *font;
float titleWidth;
float titleHeight;
NSDictionary *dict;
if (!title)
return;
@ -594,9 +595,11 @@
}
}
[font set];
[textColor set];
[title drawInRect: cellFrame withAttributes: nil];
dict = [NSDictionary dictionaryWithObjectsAndKeys:
font, NSFontAttributeName,
textColor, NSForegroundColorAttributeName,
nil];
[title drawInRect: cellFrame withAttributes: dict];
}
// Draw image centered in frame.