* NSView.m resizeSubviewsWithOldSize: check whether view has ever been

rotated (per 4.2 docs).
	* NSStringDrawing.m sizeWithAttributes: fix minor bug introduced while
	optimizing tab calc.
	* NSCell.m: drawInteriorWithFrame: minor optimization


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3379 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Felipe A. Rodriguez 1998-12-03 21:23:58 +00:00
parent 99e67e6618
commit b57813676d
6 changed files with 33 additions and 19 deletions

View file

@ -41,6 +41,7 @@ NSFont *font;
const char *str = [self cString];
int i = 0, j = TABWIDTH;
static float tabSize;
float tabSumSize;
static float pointSize;
static NSFont *lastFont = nil;
@ -60,12 +61,14 @@ static NSFont *lastFont = nil;
if(font != lastFont) // update font info
{ // if font changes
tabSize = (float)i * [font widthOfString:@"\t"];
tabSize = [font widthOfString:@"\t"];
lastFont = font;
pointSize = [font pointSize];
}
tabSumSize = (float)i * tabSize;
return NSMakeSize(([font widthOfString:self] + tabSize), pointSize);
return NSMakeSize(([font widthOfString:self] + tabSumSize), pointSize);
}
@end